The article is devoted to the regulation of external migration and related crime of foreign citizens and stateless persons. The article focuses on countering the criminal manifestations of illegal migrants, analyzes the state of crime, its structure and dynamics. The results of the study are based on a survey of experts and convicted foreign citizens. It is noted that an important element of crime prevention in this area is proper migration control. Measures are proposed to improve the prevention of criminal activity of foreign citizens on the territory of the Russian Federation and strengthen the rule of law in the migration sphere.