Mitigating carbon dioxide (CO2) emission while controlling air pollution is a critical challenge. However, few studies have explored how to achieve synergy between them from a spatiotemporal perspective. In this study, we constructed index system for CO2 mitigation and air pollution control performances based on China's 30 provinces. Then, we calculated the CO2 mitigation and air pollution control synergy degree (CASD) of each province from 2005 to 2018 using a synergy model, and based on its output, we further analyzed the spatiotemporal evolution of CASD at national, regional and local levels. Finally, we identified the key factors that affect CASD and their spatial spillover effects. We found that the CASD was low (no synergy or low synergy) and fluctuated from 2005 to 2018. CASD showed significant spatial variation: the high values appeared mainly in the southern region, and the northeastern region had the worst synergy. Furthermore, the CASD is influenced by many factors, including urbanization, industry, economy, energy, innovation and neighboring areas, driving temporal patterns and regional differences. Therefore, transdepartment and transregional synergistic governance should be implemented. Our findings provide policy references for central and local government to achieve this synergy and thereby support efforts to achieve sustainable development.