After February 2020, the majority of the world’s governments decided to implement a lockdown in order to limit the spread of the deadly COVID-19 virus. This restriction improved air quality by reducing emissions of particular atmospheric pollutants from industrial and vehicular traffic. In this study, we look at how the COVID-19 shutdown influenced the air quality in Lahore, Pakistan. HAC Agri Limited, Dawn Food Head Office, Phase 8-DHA, and Zeenat Block in Lahore were chosen to give historical data on the concentrations of many pollutants, including PM2.5, PM10 (particulate matter), NO2 (nitrogen dioxide), and O3 (ozone). We use a variety of models, including decision tree, SVR, random forest, ARIMA, CNN, N-BEATS, and LSTM, to compare and forecast air quality. Using machine learning methods, we looked at how each pollutant’s levels changed during the lockdown. It has been shown that LSTM estimates the amounts of each pollutant during the lockout more precisely than other models. The results show that during the lockdown, the concentration of atmospheric pollutants decreased, and the air quality index improved by around 20%. The results also show a 42% drop in PM2.5 concentration, a 72% drop in PM10 concentration, a 29% drop in NO2 concentration, and an increase of 20% in O3 concentration. The machine learning models are assessed using the RMSE, MAE, and R-SQUARE values. The LSTM measures NO2 at 4.35%, O3 at 8.2%, PM2.5 at 4.46%, and PM10 at 8.58% in terms of MAE. It is observed that the LSTM model outperformed with the fewest errors when the projected values are compared with the actual values.