In recent decades, the ethnic structure of the population of St. Petersburg has significantly changed. As a result of assimilation, the number and share of some ethnic groups (Ukrainians, Belarusians, Tatars, Jews, etc.) in the city’s population have decreased significantly. At the same time, the inflow of migrants from outside Russia has led to a substantial increase in the number of ethnic groups of the South Caucasus and Central Asia. The paper shows the location in St. Petersburg of representatives of the ten most numerous (after ethnic Russians) ethnic communities. The analysis was performed in 108 municipalities of St. Petersburg according to the 2010 census. An indicator of the uneven territorial distribution is the coefficient of ethnic localization, developed by the authors, which is calculated as the deviation of the share of representatives of a particular ethnic group from the city average. The paper represents the differences in spatial preferences for choosing the place of residence of representatives of various ethnic groups; the correlation indices of allocation of the ethnic communities under study were calculated. The authors propose a typology of the municipalities of the city based on the settlement preferences of the most numerous ethnic communities.