"to hem in" is the phrasal verb. "in" is the adverbial particle that completes the phrasal verb. It is not used in the typical way a preposition is used, no.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.