Dispersal is a key determinant of a population's evolutionary potential. It facilitates the propagation of beneficial alleles throughout the distributional range of spatially outspread populations and increases the speed of adaptation. However, when habitat is heterogeneous and individuals are locally adapted, dispersal may, at the same time, reduce fitness through increasing maladaptation. Here, we use a spatially explicit, allelic simulation model to quantify how these equivocal effects of dispersal affect a population's evolutionary response to changing climate. Individuals carry a diploid set of chromosomes, with alleles coding for adaptation to non-climatic environmental conditions and climatic conditions, respectively. Our model results demonstrate that the interplay between gene flow and habitat heterogeneity may decrease effective dispersal and population size to such an extent that substantially reduces the likelihood of evolutionary rescue. Importantly, even when evolutionary rescue saves a population from extinction, its spatial range following climate change may be strongly narrowed, that is, the rescue is only partial. These findings emphasize that neglecting the impact of non-climatic, local adaptation might lead to a considerable overestimation of a population's evolvability under rapid environmental change.