To mitigate the societal impact of the COVID-19 pandemic, China implemented long-term restrictive measures. The sudden liberalization at the end of 2022 disrupted residents' daily routines, making it scientifically intriguing to explore its effect on air quality. Taking Chongqing City in Southwest China as an example, we examined the impact of restriction liberalization on air quality, identified potential sources of pollutants, simulated the effects of abrupt anthropogenic control relaxation using a Random Forest Model, and applied an optimized model to predict the post-liberalization pollutant concentrations. The results showed increases in PM2.5 (72.3%), PM10 (67.7%), and NO2 (21.9%) concentrations, while O3 concentration decreased by 20.5%. Although potential pollution source areas contracted, pollution levels intensified with northeastern Sichuan, interior Chongqing, and northern Guizhou being major contributors to pollutant emissions. Anthropogenic emissions accounted for 26.7 ~ 33% changes in PM2.5 and PM10 concentrations while meteorological conditions contributed to 40.2 ~ 43.3% variations observed during the period. The optimized model demonstrated a correlation between predicted and observed values with R2 ranging from 0.70 to 0.89, enabling accurate prediction of post-liberalization pollutant concentrations. This study can enhance our understanding regarding the impact of sudden social lockdown relaxation events on air quality while providing support for urban air pollution prevention.