The National Innovative City Pilot Policy (NICPP) is a policy implemented by the Chinese government to create an environment conducive to innovation, optimize industrial structure, promote economic development, and stimulate green innovation. The impact of this policy on ecological welfare performance is a question worth exploring. Based on panel data from 285 cities from 2007 to 2021, this paper uses the multi-period difference-in-difference (DID) model, propensity score matching method, and spatial DID model to study the impact of NICPP on ecological welfare performance and spatial spillover effects. The results show that (1) NICPP can significantly improve ecological welfare performance. (2) The mechanism analysis found that NICPP mainly improves ecological welfare performance through technological innovation investment, industrial structure upgrading, and increasing government attention. (3) The heterogeneity analysis found that NICPP has a more substantial driving effect on the ecological welfare development of cities in the eastern and western regions, cities with higher administrative levels, and cities with lower secondary industry agglomeration. (4) Further research has found that NICPP not only promotes the development of local ecological welfare but also has a positive spatial spillover effect on the ecological welfare performance of neighboring regions. This paper enriches the research on the effects of NICPP and provides policy references for the sustainable development of cities.