Environmental regulation and innovative development are essential means to solve the negative externalities of environmental pollution. However, developing countries often face the dual pressures of environmental pollution and innovative development. This paper focuses on whether environmental protection policies (EPP) can achieve a win-win situation between green development and innovative development. Based on the panel data of 277 cities in China from 2006 to 2016, this paper studies the impact of China's EPP on urban innovation efficiency by using a time-varying difference-in-differences approach. Combined with the geographical features of Chinese cities, we further take urban form into the mediating effect analysis. The results show that: (1) EPP has a significant positive impact on innovation efficiency, and the result satisfies the parallel trend test. (2) The robustness test shows that EPP has technological innovation and diffusion effects. (3) The mediating effect test show that Urban form has a significant mediating effect on the impact of EPP on innovation efficiency. Therefore, environmental policies should be formulated considering the differences of urban form to achieve the optimal implementation effect.