In many European countries, people increasingly leave rural or small municipalities to live and work in urban or metropolitan environments. Although previous work on the ‘left behind’ places has examined the relationship between the rural–urban divide and vote choice, less is known about how depopulation affects electoral behaviour. Is there a relationship between experiencing a loss in population and support for the different parties? We investigate this question by examining the Spanish case, a country where the topic of depopulation has become a salient issue in political competition. Using a newly compiled dataset, we also explore whether the relationship between depopulation and electoral returns is moderated by municipality size, local compositional changes, the loss of public services and changes in amenities. Our findings show that depopulated municipalities give higher support to the main Conservative party, mainly in small municipalities. Yet, municipalities on the brink of disappearance are more likely to give larger support to the far‐right. Results overall show that the effect of depopulation seems to be driven by compositional changes, and not as a result of losing public services or a deterioration of the vibrancy of the town. Our findings have important implications for our understanding of the relationship between internal migration and electoral behaviour.