Managing immigration is a challenge at the political, economic, and social levels. Clarifying the social psychological antecedents behind the onset of negative attitudes towards immigrants might help overcome this challenge. The present study investigates the relationships between people’s experience of social exclusion, feelings of generalized interpersonal trust, and anti-immigrant attitudes across 23 European countries. We used data from the European Social Survey 8 (2016), employing a representative sample of the European population. A 1–1–1 multilevel mediation model showed that: (a) the higher the experience of social exclusion, the lower the generalized trust towards others; (b) the experience of social exclusion related positively and directly with anti-immigration attitudes; and (c) generalized interpersonal trust mediated the relationship between experienced social exclusion and anti-immigrant attitudes so that the experience of being socially excluded reduced feelings of generalized interpersonal trust that, in turn, promoted hostile attitudes towards immigrants. Taken together, these results create a platform for future research on the emergence of negative attitudes towards immigrants and factors that might facilitate the development of a climate of integration and acceptance.