Do demographic changes caused by migration make people more nationalistic? It is difficult to answer this question because demographic transformations can boost support for far-right parties that employ nationalistic rhetoric; therefore, people’s new attitudes could be elite-driven. Using administrative and panel survey data from Chile before the emergence of a far-right party, we demonstrate that immigration shocks (i.e., rapid and large demographic changes) increase nationalistic attitudes. We also provide evidence from multiple sources documenting increased hostility, animosity, and discrimination toward migrants. Therefore, we interpret people’s new attitudes as evidence of exclusionary nationalism. In addition, we find that municipalities that receive large numbers of migrants are more likely to support the far-right party that was founded a few years later. This finding suggests that demographic changes explained by migration might make parties using nationalistic rhetoric more appealing to these now more nationalistic citizens.