As global climate change intensifies, climate protection is important for the sustainable development of human society. In the process of urbanization and industrialization, carbon dioxide emissions are an important factor contributing to global warming. Therefore, modelling projections of future urban land use under low-carbon scenarios are essential for sustainability policy development. Few studies have focused on the impact of carbon emissions on urban land use change in Shanghai, as current research has primarily concentrated on developing methods for urban land use modelling. This paper utilizes a cellular automata (CA) simulation model based on the Random Forest (RF) algorithm to select various spatial variables of carbon emissions as the driving factors that affect urban land use changes. These variables include traffic location factors, economic development factors, electricity consumption, and population density. In this study, remote sensing imagery of urban nighttime lighting is also used to construct a simulation model of land use types in Shanghai. The model is then used to analyze the contribution of carbon emission constraints to urban land use changes. Actual historical land use data from 2013 and 2019 are used for validation, and the prediction model is used to predict land use outcomes under different low-carbon scenarios in 2025. The model is validated by simulating multiple intra-city land use maps for 2019 (kappa = 0.88, OA=92.71 %). The method of out-of-bag error from the random forest is used to evaluate the significance of carbon emission constraints. Using the validated model, the constraints in the CA model are changed to predict the land use simulation results of Shanghai in 2025 under different low-carbon scenarios. In terms of significance, factors such as distance to power plants, distance to major roads, real GDP, and population density can all have a significant impact on changes in urban land use. By selecting the low-carbon scenario with the most appropriate thresholds for each driver, it is possible to obtain the land use simulation results of Shanghai in 2025 under the optimal low-carbon scenario, while ensuring the high accuracy of the RF-CA model and simultaneously reducing the impact of factors on the city’s overall carbon emissions. This paper provides a scientific base for urban planners and scholars to thoughtfully design urban land use while cutting down on carbon emissions. Furthermore, it can aid government agencies in establishing associated planning approaches.