Climate change causes species ranges to shift geographically as individuals colonise new suitable temperature zones or fail to reproduce where climate conditions fall below tolerance levels. Little is known about the potential loss of genetic diversity in such dynamic ranges. We investigated the level and distribution of neutral genetic diversity in shifting metapopulations during three scenarios of temperature increase projected for this century and at various degrees of weather variability. We used an individual-based and spatially explicit metapopulation model in which temperature zones were simulated to move across a fragmented landscape following different climate change scenarios. Although the connectivity between habitat patches allowed the species, modelled after the middle spotted woodpecker Dendrocopos medius, to move along with the shifting temperature range, existing neutral genetic diversity was lost under all three temperature increase scenarios. This was independent of the loss of individuals. The explanation for this effect is that only a part of the original genetic variation moved into the newly colonised habitat. Under increased weather variability the number of individuals and the number of alleles per locus were persistently lower. However, the pattern of changes in allele distributions under temperature zone shifts was the same under all weather variability levels. Genetic differentiation between populations had a tendency to increase at metapopulation range margins, but decreased again when population sizes increased in time. Increased weather variability led to increased variation around the mean genetic differentiation across the metapopulation. Our results illustrate the usefulness of more realistic models for studying the effects of climate change on metapopulations. They indicate that biodiversity monitoring indices based on species occurrence and abundance are not a good proxy for the trend in the level of genetic diversity. Further, the results underline the importance of conserving areas where species have existed for a long time as modern refugia for genetic diversity.