From Mirriam Webster:
il·le·gal
Pronunciation: (")i(l)-'lE-g&l
Function: adjective
Etymology: Middle French or Medieval Latin; Middle French illegal, from Medieval Latin illegalis, from Latin in- + legalis legal
: not according to or authorized by law : UNLAWFUL, ILLICIT;
im·mi·grant
Pronunciation: 'i-mi-gr&nt
Function: noun
: one that immigrates : as a person who comes to a country to take up permanent residence
I believe the issue to be with the first word, rather than the second.