Atmospheric pollution significantly threatens environmental sustainability and public health, particularly in rapidly developing urban areas like Haryana, India. The research introduces a holistic framework for predicting the Air Quality Index (AQI) by combining Inverse Distance Weighting (IDW) spatial interpolation with a stacked ensemble machine learning technique. Daily average levels of critical pollutants—PM 2 . 5 , PM 10 , NO 2 , SO 2 , CO, O 3 , and NH 3 —were gathered from 2019 to 2024 at 24 CPCB monitoring stations, accumulating over 43,800 data points and LULC from Bhuvan. Statistical methods, including box plots, PCA, correlation heat maps, and VIF analysis, verified PM 2 . 5 and PM 10 as the primary contributors to AQI, exhibiting a strong correlation (r ≈ 0.87) and seasonal fluctuations. The ensemble model, which integrates RF, SVM, ANN, GPR, and XGBoost within a linear regression meta-learner (developed in MATLAB), showcased exceptional performance with high R 2 and low RMSE values, surpassing the performance of individual models. Feature importance and SHAP analysis confirmed the significant impact of particulate matter. The proposed framework enhances predictive accuracy and improves interpretability, providing actionable insights for environmental organizations. While individual machine learning models and SHAP have been used in prior AQI studies, this study’s novelty lies in their integration within a spatial forecasting pipeline combining IDW-based interpolation, stacked ensemble learning, and explainability techniques—offering spatial completeness, interpretability, and model robustness in a unified framework. Future advancements could further integrate meteorological factors and satellite-derived data to improve spatial-temporal adaptability.