As global climate change becomes increasingly severe, pollution reduction and carbon mitigation have become particularly important. At present, various industries and sectors are actively engaged in pollution reduction and carbon mitigation efforts, but their effectiveness remains unclear. There is currently a lack of technology that can provide effective indication and guidance for pollution reduction and carbon mitigation efforts across different industries and sectors, leading to difficulties in systematizing and refining control measures. To address this, this paper constructs a correlation model between sectoral electricity consumption and average carbon column concentration in cities by utilizing large-scale, multi-period electricity consumption and average carbon column concentration data, and employing random forest, XGBoost, and stacking regression methods. By integrating time rolling window techniques, the model reveals the dynamic temporal relationship between electricity consumption and carbon concentration, thereby providing guidance and indications for pollution reduction and carbon mitigation efforts. To ensure the reliability of the model, this study collected categorized electricity consumption data and regional average carbon concentration data from 6 cities over a five-year period from January 2017 to December 2021. The performance of the correlation model was evaluated using indicators such as R² and RMSE. The results show that in most cities, the model has high explanatory power and low prediction error, with the highest R² of the stacking model reaching 0.8528 and the root mean square error (RMSE) being 1.4939. To further analyze the dynamic temporal impact relationship between sectoral electricity consumption and average carbon column concentration in cities, this paper also calculates the correlation of sectoral electricity consumption in different time periods for each city through time rolling analysis, revealing the main sectoral factors influencing the rise in urban carbon concentration over different time intervals. This provides valuable insights for grid management and energy policy planning. This study not only provides a scientific basis for assessing and guiding pollution reduction and carbon mitigation efforts in various industries but also offers important reference value for policymakers and industry managers, helping to formulate more effective emission reduction strategies and energy management measures.