The urban thermal environment undergoes significant influences from changes in land use/land cover (LULC). This article uses CA-ANN and ANN algorithms to forecast LULC and changes in the urban thermal environment in Nanjing for the years 2030 and 2040. It investigates the interplay between LULC changes, land surface temperature (LST), and the urban thermal field variance index (UTFVI). The findings reveal that urban land exhibited a significant expansion trend from 2000 to 2019, reaching 1083.43 km2 in 2019. The forecast indicates that urban land may increase by 8.79% and 10.92% by 2030 and 2040, respectively. Conversely, vegetation and bare land may decrease. The LST is likely to continue to rise, accompanied by a significant expansion of the high temperature range and a contraction of the low temperature range. By 2030 and 2040, the area with LST<20 °C is likely to decrease by 2.17% and 3.19%, while the area with LST>30 °C is likely to expand by 5.68% and 8.08%, respectively. The UTFVI area of urban land may decrease at none and middle levels but may notably expand at stronger and strongest levels. The areas with UTFVI at none, weak, and middle levels show a declining trend, while the increase in UTFVI at the strong level may exceed 46.29% and the strongest level of UTFVI may continue to expand. This study offers new insights into urban sustainable development and thermal environment governance.