But the moment I reached the castle, I was seized by a man leading royal guards and thrown into this dungeon.

Literal

However castle [to-に] reach-[as-soon-as-なり], royal-guards [obj-を] led person [by-に], I [topic-は] this dungeon [to-に] was-arrested-[regrettably-しまった].

しかし 'however' opens the contrastive turn. ~なり 'as soon as / the moment X' is a literary/formal construction attached to the dictionary form of a verb — a sibling of ~たらすぐに or や否や but more classical in feel. 近衛兵 'royal guards / imperial guards' is historical-military vocabulary. 率いる '(to) lead' (formal) here in the relative clause 率いた人 'a person who led.' 勾引する '(to) arrest / abduct / take (someone) into custody' is old-fashioned legal vocabulary.