Controlling carbon dioxide (CO2) emissions is the foundation of China’s goals to reach its carbon peak by 2030 and carbon neutrality by 2060. This study aimed to explore the spatial and temporal patterns and driving factors of CO2 emissions in China. First, we constructed a conceptual model of the factors influencing CO2 emissions, including economic growth, industrial structure, energy consumption, urban development, foreign trade, and government management. Second, we selected 30 provinces in China from 2006 to 2019 as research objects and adopted exploratory spatial data analysis (ESDA) methods to analyse the spatio-temporal patterns and agglomeration characteristics of CO2 emissions. Third, on the basis of 420 data samples from China, we used partial least squares structural equation modelling (PLS-SEM) to verify the validity of the conceptual model, analyse the reliability and validity of the measurement model, calculate the path coefficient, test the hypothesis, and estimate the predictive power of the structural model. Fourth, multigroup analysis (MGA) was used to compare differences in the influencing factors for CO2 emissions during different periods and in various regions of China. The results and conclusions are as follows: (1) CO2 emissions in China increased year by year from 2006 to 2019 but gradually decreased in the eastern, central, and western regions. The eastern coastal provinces show spatial agglomeration and CO2 emission hotspots. (2) Confirmatory analysis showed that the measurement model had high reliability and validity; four latent variables (industrial structure, energy consumption, economic growth, and government management) passed the hypothesis test in the structural model and are the determinants of CO2 emissions in China. Meanwhile, economic growth is a mediating variable of industrial structure, energy consumption, foreign trade, and government administration on CO2 emissions. (3) The calculated results of the R2 and Q2 values were 76.3 and 75.4%, respectively, indicating that the structural equation model had substantial explanatory and high predictive power. (4) Taking two development stages and three main regions as control groups, we found significant differences between the paths affecting CO2 emissions, which is consistent with China’s actual development and regional economic pattern. This study provides policy suggestions for CO2 emission reduction and sustainable development in China.