Some species are expanding their ranges polewards during current climate warming. However, anthropogenic fragmentation of suitable habitat is affecting expansion rates and here we investigate interactions between range expansion, habitat fragmentation and genetic diversity. We examined three closely related Satyrinae butterflies, which differ in their habitat associations, from six sites along a transect in England from distribution core to expanding range margin. There was a significant decline in allozyme variation towards an expanding range margin in Pararge aegeria, which has the most restricted habitat availability, but not in Pyronia tithonus whose habitat is more widely available, or in a non-expanding ‘control species’ (Maniola jurtina). Moreover, data from another transect in Scotland indicated that declines in genetic diversity in P. aegeria were evident only on the transect in England, which had greater habitat fragmentation. Our results indicate that fragmentation of breeding habitats leads to more severe founder events during colonization, resulting in reduced diversity in marginal populations in more specialist species. The continued widespread loss of suitable habitats in the future may increase the likelihood of loss of genetic diversity in expanding species, which may affect whether or not species can adapt to future environmental change.