Abstract
This study investigates how foreign direct investment (FDI) affects urban air pollution and when green technology innovation (GTI) can buffer that effect. Using panel data for 236 Chinese cities from 2008 to 2020, we estimate a dynamic spatial specification with generalized spatial two-stage least squares (GS2SLS) to account for spatial spillovers and temporal persistence in PM2.5. The results indicate that FDI is associated with higher PM2.5 on average, but the adverse effect weakens where GTI is stronger. Threshold analysis further suggests a nonlinear pattern whereby sufficiently high GTI attenuates the pollution impact of FDI. The main findings are robust to alternative spatial weight matrices and commonly used measures of air pollution and GTI. Policy-wise, the evidence highlights two levers that work jointly: upgrading city-level green innovation capacity and screening FDI by environmental performance. Strengthening cross-city coordination also matters, given the spatial nature of pollution. Overall, the paper clarifies the conditions under which FDI’s environmental footprint can be reduced and provides an integrated view of FDI, innovation, and air quality within a spatial–dynamic framework. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1038/s41598-026-37141-6.