With the ongoing challenge of air pollution posing serious health and environmental threats, particularly in rapidly industrializing regions, accurate forecasting and effective pollutant identification are crucial for enhancing public health and ecological stability. This study aimed to optimize air quality management through the prediction of the Air Quality Index (AQI) and identification of air pollutants. Our study spans nine representative cities (Hohhot, Yinchuan, Lanzhou, Beijing, Taiyuan, Xi’an, Shanghai, Nanjing, Wuhan) in China, with data collected from January 1, 2015, to November 30, 2021. We proposed a new model for daily AQI prediction, termed VMD-CSA-CNN-LSTM, which employed advanced machine learning techniques, including convolutional neural networks (CNN) and long short-term memory (LSTM) networks, and leveraged the chameleon swarm algorithm (CSA) for hyperparameter optimization, integrated through a variational mode decomposition approach. The model was developed using data from Lanzhou, with a split ratio of 8:1:1 into training, validation, and test sets, achieving an RMSE of 2.25, MAPE of 0.02, adjusted R-squared of 98.91%, and training efficiency of 5.31%. The model was further externally validated in the other eight cities, yielding comparable results, with an adjusted R-squared above 96%, MAPE below 0.1, and RMSE below 7.5. Additionally, we employed a random forest algorithm to identify the primary pollutants contributing to AQI levels. Our results indicated that PM2.5 was the most significant pollutant in Beijing, Taiyuan, and Xi’an, while PM10 was dominant in Hohhot, Yinchuan, and Lanzhou. In Shanghai, Nanjing, and Wuhan, both PM2.5 and PM10 were critical, with ozone also identified as a major air pollutant. This study not only advances the predictive accuracy of AQI models but also aids policymakers by providing a reliable tool for air quality management and strategic planning aimed at pollution reduction. The integration of these advanced computational techniques into environmental monitoring practices offers a promising avenue for enhancing air quality and mitigating pollution-related risks.