Effectively modeling carbon prices while maintaining interpretability is essential, given the potential risks associated with unexpected price fluctuations. To this end, this study proposes an explainable machine learning (XML) framework to predict and explain carbon prices in China's three representative carbon markets: Shenzhen, Hubei, and Beijing. Leveraging the strengths of tree -based machine learning models and Tree SHAP algorithms, we unveil global and local explanations in the driving patterns of carbon prices. Our findings indicate that the distribution of local explanatory effects exhibits asymmetric and long-tailed characteristics. Notably, the top global drivers in Shenzhen, Hubei, and Beijing are the photovoltaic price index, coal prices, and the industrial added value of electricity sectors, respectively. Furthermore, we uncover the nonlinear impacts of key drivers on individual carbon price predictions, and identify three key interaction patterns through the calculation of SHAP interaction values. Lastly, we evaluate the explainable performance of various XML benchmarks to validate the superiority of our XML framework, as well as demonstrate its economic significance via a switching trading strategy. Our research provides a reference for mitigating large price fluctuations in local carbon price samples, thereby promoting the stability of carbon markets.