In this work, to ensure that Western China achieves the goal of peaking carbon emissions while developing, considering Guangxi as an example, based on the statistical data of population, economy, society, energy, urban development, and other dimensions from 2000 to 2021, the total amount of carbon emissions and sinks from 2000 to 2021 was calculated according to the recommended formula of the Intergovernmental Panel on Climate Change (IPCC), the key factors affecting carbon emissions based on the ridge regression were identified, the STIRPAT carbon emission prediction model was constructed, and the carbon emissions of Guangxi from 2022 to 2040 were predicted for the three scenarios of different development paths. The results showed that the total carbon dioxide emissions (CO