Unlawfully has 2 different meanings across 1 category:
Adverb
not conforming to the law
"they were unlawfully married"
In a manner not conforming to the law.