Accurate forecasting of carbon dioxide (CO2) emissions is essential for designing effective climate mitigation strategies. However, macroeconomic and energy-sector time series often share common trends, which can inflate predictive performance and reduce the interpretability of machine learning (ML) models. This study evaluates the forecasting performance and interpretability of ML frameworks under two alternative structural specifications: natural logarithms (log) and log-differences (dlog). Using annual data for Mexico, models were trained to predict CO2 emissions over a 27-year out-of-sample validation period (1997–2023) with Gross Domestic Product (GDP), Fixed Asset Investment (FAI), Population (P), and Energy Consumption (EC). To ensure comparability, all predictions were reconstructed and evaluated at absolute CO2 levels. The results show that the log specification with Gaussian Process Regression (GPR) achieved the lowest absolute forecasting error (RMSE = 12.91 × 106; MAPE = 1.48%; R2 = 0.938). However, Explainable AI (XAI) analysis via SHAP (SHapley Additive exPlanations) indicates that this specification is heavily driven by scaled trends, limiting its ability to isolate dynamic predictive signals from shared long-term trajectories. In contrast, the dlog specification with ExtraTrees delivered highly competitive forecasting performance (RMSE = 13.96 x 106; MAPE = 1.66%; R2 = 0.928) and superior stability in capturing annual growth dynamics. Furthermore, the dlog-ExtraTrees model established a mathematically consistent and interpretable structure, with SHAP values mapping low or negative annual variations directly to emissions contractions and high variations to accelerated growth. This dynamic response was driven primarily by annual growth rates in economic output (dln_GDP) and energy demand (dln_EC). We conclude that while log models may achieve slightly lower forecast errors due to trend adherence, the dlog-ExtraTrees architecture significantly improves the transparency, structural consistency, and economic reliability of ML-driven environmental forecasting, making it an optimal tool for robust policy evaluation.