Cross-fertilisation predominates in eukaryotes, but shifts to self-fertilisation are common and ecologically and evolutionarily important. Reproductive assurance under outcross gamete limitation is one eco-evolutionary process held responsible for the shift to selfing. Although small effective population size is a situation where selfing plants could theoretically benefit from reproductive assurance, empirical tests of the role of population size are rare. Here, we show that selfing evolved repeatedly at range margins, where historical demographic processes produced low effective population sizes. Outcrossing populations of North American Arabidopsis lyrata have low genetic diversity at geographic margins, with a signature of post-glacial range expansion in the north and rear-edge isolation in the south. Selfing populations occur at the margins of two genetic groups and never in their interior. These results corroborate small effective population size as the promoter of self-fertilisation and have important implications for our understanding of species turnover, range limits and range dynamics.