Data factors have become an essential factor of production in today’s digital era, and provided renewed energy for China’s green and high-quality development. This study analyses the impact of data factor-driven industries on green total factor productivity (GTFP) and the underlying mechanisms using panel data of 277 Chinese cities from 2008 to 2020. The results show that: First, the urban data factor-driven industry can enhance GTFP. Second, the data factor-driven industry can increase the input–output ratio and enhance GTFP by promoting AI technological innovation and AI technological entrepreneurship. Third, the heterogeneity analysis show that in regions with high levels of digital technological innovation, the market size of data factor-driven industries is larger and the effect of data factor-driven industries in enhancing GTFP is more significant. And in regions with low levels of savings, the data factor-driven industry has limited capital availability and is more efficient in using capital, which has a stronger effect on GTFP enhancement. This study provides valuable empirical evidence on the relationship between data factor-driven industries and urban GTFP, and important policy implications for fully leveraging the green economic effects of data factors, and promoting green and high-quality urban development.