Investigating the factors that exert an influence on CO2 emissions represents a critical undertaking for the formulation of effective policies aimed at reducing such emissions. Numerous past studies have attempted to explore the potential relationships between CO2 emissions and a variety of potential influencing factors. However, many of these investigations have been constrained by the inability to fit large sample datasets, as well as by the limitations of conventional research methods in addressing non-linear relationships. The aforementioned insufficiencies have resulted in a situation wherein a restricted set of factors can be examined in tandem within a singular model. This restriction has impeded the comprehensive investigation of multiple variables and their potential interrelationships. To bridge these research gaps, this research employed machine learning models to fit voluminous datasets concerning urban CO2 emissions and socioeconomic factors. This research also incorporated explainable techniques to disentangle the intricate relationships between the factors under investigation. The results demonstrated that urban fiscal structure, urban energy consumption, urban land use, and urban capital accumulation represented the primary factors driving urban CO2 emissions. The ALE test was employed to discern the specific relationships between these factors and CO2 emissions, ultimately revealing that almost all of these factors positively impacted CO2 emissions as their values rise. In both univariate and bivariate ALE tests, Expenditures on Science and Technology had emerged as a highly influential feature in terms of its impact on urban CO2 emissions. While the interaction effects elicited by Expenditures on Science and Technology had the potential to curb urban CO2 emissions in several ways, this research identified that these effects may be constrained. The relationship identified between urban socio-economic development and CO2 emissions also indicated that achieving low-carbon development in urban areas necessitates optimal resource allocation and the transformation of energy consumption structures. Furthermore, each city needs to tailor its low-carbon development pathway to its distinct characteristics.