Settingoff fireworks during the Spring Festival (SF) is a traditional practice in China. However, because of its environmental impact, the Chinese government has banned this practice completely. Existing evaluations of the effectiveness of firework prohibition policies (FPPs) lack spatiotemporal perspectives, making it difficult to comprehensively assess their effects on air quality. Consequently, this study used remote sensing technology based on aerosol optical depth and multiple variables, compared nine statistical learning methods, and selected the optimal model, transformer, to estimate daily spatiotemporal continuous PM2.5 concentration datasets for Tianjin from 2016 to 2020. The overall model accuracy reached a root mean square error of 15.30 μg/m³, a mean absolute error of 9.55 μg/m³, a mean absolute percentage error of 21.07%, and an R2 of 0.88. Subsequently, we analysed the variations in PM2.5 concentrations from three time dimensions–the entire year, winter, and SF periods–to exclude the impact of interannual variations on the experimental results. Additionally, we quantitatively estimated firework-specific PM2.5 concentrations based on time-series forecasting. The results showed that during the three years following the implementation of the FPPs, firework-specific PM2.5 concentrations decreased by 52.70%, 49.76%, and 86.90%, respectively, compared to the year before the implementation of the FPPs. Spatially, the central urban area and industrial zones are more affected by FPPs than the suburbs. However, daily variations of PM2.5 concentrations during the SF showed that high concentrations of PM2.5 produced in a short period will return to normal rapidly and will not cause lasting effects. Therefore, the management of fireworks needs to consider both environmental protection and the public's emotional attachment to traditional customs, rather than simply imposing a blanket ban on fireworks. We advocate improving firework policies in four aspects–production, sales, supervision, and control–to promote sustainable development of the ecological environment and human society.