In this study, MODIS land products and China land cover datasets were used to extract normalized difference vegetation index, land surface temperature, and vegetation cover type in Yan’an City during the summers of 2017–2022. On this basis, analysis of spatial change and correlation were carried out as a way to study the mitigation effect on urban heat islands in Yan’an City with forest. The study showed that: (1) The coverage of normalized difference vegetation index over 0.4 in summer in Yan’an City increased from 59.38% to 69.12%, and the vegetation showed good growth conditions. It has a spatial distribution pattern of more in the south and less in the north. (2) The proportion of the urban heat island in Yan’an City increased from 15.51% to 16.86%. Urban heat island intensity fluctuated year by year, with the maximum urban heat island intensity of 6.26 °C appearing in 2019. It has a spatial distribution pattern of less in the south and less in the north. The transition rate of temperature field grade from low to high is 73.32%, and the transition rate to low is only 0.31%. (3) There is a negative correlation between land surface temperature and normalized difference vegetation index in Yan’an City. Vegetation has a mitigating effect on the UHI and the best cooling effect among the vegetation is shown by forest. The cooling effect of forest in Yan’an City is attenuated by an increase in distance, and the effective range is greater than 1000 m. In this study, the regulation effect of forest on the urban heat island was obtained by digging deeper into the intrinsic connection between spatial change in vegetation cover and land surface temperature change in Yan’an City. It provides an important reference for the formulation of meteorological protection policy as well as the promotion of sustainable development of the urban ecological environment and is of guiding significance for future urban planning and ecological construction.