Environmental regulation is expected to stimulate green innovation for the promotion of urban sustainability, while the effectiveness of this stimulus has long been debated under the Porter hypothesis and the crowding out theory. Em-pirical studies under different contexts have not reached a consistent conclusion yet. Based on the data of 276 cities in China from 2003 to 2013, this study captures the spatiotemporal non-stationarity in the effects of environmental reg-ulation on green innovation with the combination of Geographically and Temporally Weighted Regression (GTWR) and Dynamic Time Warping (DTW) algorithm. The results show that environmental regulation has an overall U -shape impact on green innovation, indicating that the Porter hypothesis and the crowding out theory are not in con-flict, but are theoretical interpretations of different stages of local responses to environmental regulation. Specifically, the effects of environmental regulation on green innovation present to be diverse in patterns that include enhancing, stagnant, undermining, U-shape, and inverted U-shape. These contextualized relationships are shaped by local indus-trial incentives and innovation capacities of pursing green transformations. The spatiotemporal findings allow policy -makers to better understand the multi-staged and geographically diverse impacts of environmental regulation on green innovations, and formulate targeted policies for different localities.