This paper examines the relationship between climate change and the spatial distribution of population in China. We establish a two-way fixed effects model to investigate the role of temperature difference in the spatial distribution of China's population. We find that the annual variation of temperature has an impact on city size in both large and small cities, and that city size tends to shrink as the temperature difference increases. Meanwhile, we also find that the population in the cities located south of Qinling-Huaihe Line and Aihui-Tengchong Line (Hu's Line) is more sensitive to temperature effects, and that the temperature difference has a significant negative effect on city size. Similarly, the same results are found for prefecture-level cities with low administrative levels. Considering the endogeneity between temperature change and city size, we adopt an instrumental variable using latitude to perform a more robust empirical analysis, the results of a series of robustness tests support these conclusions.