Species are shifting their ranges under climate change, with genetic and evolutionary consequences. As a result, the spatial distribution of genetic diversity in a species’ range can show a signature of range expansion. This genetic signature takes time to decay after the range stops expanding and it is important to take that lag time into account when interpreting contemporary spatial patterns of genetic diversity. In addition, the return to spatial equilibrium on an ecologically relevant timescale will depend on migration of genetic diversity across the species’ range. However, during a range shift alleles may go extinct at the retracting range margin due to spatial sorting. Here we studied the spatial pattern of genotypes that differ in dispersal rate across the species range before, during and after a range shift, assessed the effect of range retraction on this pattern, and quantified the duration of the ephemeral genetic signature of range expansion for this trait. We performed simulation experiments with an individual-based metapopulation model under several contemporary climate change scenarios. The results show an increase of the number of individuals with high dispersal rate. If the temperature increased long enough the allele coding for low dispersal rate would go extinct. The duration of the genetic signature of range expansion after stabilisation of the species’ distribution lasted up to 1200 generations after a temperature increase for 60 years at the contemporary rate. This depended on the total displacement of the climate optimum, as the product of the rate of temperature increase and its duration. So genetic data collected in the field do not necessarily reflect current selection pressures but can be affected by historic changes in species distribution, long after the establishment of the current species’ range. Return to equilibrium patterns may be hampered by loss of evolutionary potential during range shift.