Chinese government has proposed a national contribution plan that involves achieving the peak CO2 emissions by 2030 and carbon neutrality by 2060. To explore the pathway of achieving carbon neutrality, we tried to use resources taxes and land reclamation deposits as compulsory ecological compensation (CEC). In order to test if CEC can affect CO2 emissions, energy intensity was selected as the intermediate variable. We found that the CO2 emissions trend in China is consistent with environmental Kuznets curve hypothesis and proved that CEC displayed a spillover effect on energy intensity. Likely, energy intensity presented a spillover effect on CO2 emissions. Therefore, CEC will spatially affect CO2 emissions. The generalized spatial two-stage least-squares estimate model was used to identify the impact mechanism of coal production on energy intensity with CEC as the instrumental variable. The results indicated that reducing coal production in neighboring regions may cause the mitigation of local CO2 emissions. Finally, regression analyses carried out by region suggested regional cooperation should be carried out in the process of carbon mitigation.