In recent years, artificial intelligence (AI) has garnered significant attention as both a driving force for green innovation and a potential source of environmental pressure. However, empirical research on its policy-driven effects remains relatively limited. This study examines the impact of China’s “National New Generation Artificial Intelligence Innovation and Application Pilot Zones” (AIIDPZ) on urban green total factor productivity (GTFP). Using panel data from 280 prefecture-level cities between 2013 and 2023, the study employs a difference-in-differences (DID) model for empirical analysis and validates the reliability of the results through robustness tests such as instrumental variable estimation, placebo tests, and propensity score matching. The study finds that the AIIDPZ significantly enhances the GTFP levels of pilot cities. Mechanism analysis reveals three pathways: first, policies promote green technological innovation by improving educational standards; second, they enhance GTFP by improving energy efficiency and optimizing resource allocation; and third, they drive green development by improving digital infrastructure. Heterogeneity tests indicate that policy effects are more pronounced in non-resource-based cities, regions with more advanced industrial structures, smaller cities, and areas with weaker digital infrastructure. This study enriches empirical evidence on the promotion of sustainable productivity by AI policies at the micro level, expands academic discussions on the “double-edged sword” effect of AI, and provides policy implications for formulating AI strategies that balance technological innovation and low-carbon development.