Based on panel data from 210 prefecture-level cities in China from 2003 to 2021, this study employs the Time-Varying Differences-in-Differences (Time-Varying DID) approach to systematically examine the impact of smart city construction on pollution emissions and its underlying mechanisms. Additionally, the Propensity Score Matching–Differences-in-Differences method is employed for further validation. The research findings indicate that Smart City Construction (SCC) significantly reduces urban Volume of Sewage Discharge (VSD), sulfur dioxide emissions (SO2), and Emissions of Fumes and Dust (EFD), thereby mitigating pollution emissions (PE) and enhancing environmental quality. Mechanism analysis reveals that SCC achieves these effects through scale effects, structural effects, and technological effects. City heterogeneity analysis shows that provincial capital cities exhibit a stronger suppression effect on pollution emissions compared to non-provincial capital cities. Moreover, cities with lower levels of education attainment demonstrate a stronger ability to curb pollution emissions, while larger cities exhibit a more pronounced impact on mitigating pollution emissions. The marginal contributions of this study mainly consist of three aspects: Firstly, it enriches the literature on environmental impact factors by assessing, for the first time, the influence of SCC on PE. Secondly, a comprehensive approach is employed, integrating VSD, EFD, SO2 data, and economic and pollution data at the city level. Time-Varying DID is used to evaluate the policy effects of SCC. Finally, the study analyzes the impact mechanisms of SCC policy on environmental emissions from various perspectives.