As the importance of global climate change and sustainable development issues increases, the enhancement of urban green innovation capabilities is particularly crucial since cities are the main source of energy consumption and carbon emissions. This study focuses on China’s New Energy Demonstration City policy to explore how it influences urban green innovation capabilities. By employing a quasi-natural experimental method, combined with data from 282 Chinese cities from 2007 to 2021, this paper provides an in-depth analysis of the impact of the New Energy Demonstration City policy on urban green innovation capabilities. It was found that the policy significantly improves the cities’ green innovation capabilities, and this conclusion remains valid after robustness checks. The study also reveals that technological investment and public environmental awareness are two critical mechanisms through which the New Energy Demonstration City policy affects urban green innovation capabilities. Furthermore, this policy has been found to significantly enhance the green innovation capabilities of neighboring cities through spatial spillover effects. The study also examines the interaction between the national-level Big Data Comprehensive Experimental Zone policy and the New Energy Demonstration City policy, discovering that the pilot policy of the national-level Big Data Comprehensive Experimental Zone has to some extent promoted the effectiveness of the New Energy Demonstration City policy in driving urban green transformation. This research provides a new perspective for understanding the dynamics of urban green innovation and points the way for future research and policymaking.