Promoting green technology innovation (GTI) through environmental regulation is a key measure in reducing the severity of environmental problems. However, the effects of formal environmental regulation (FER) and informal environmental regulation (IER) on GTI have not been clarified. Through theoretical analysis, this paper analyzes the effects of FER and IER on GTI based on OLS and GTWR models. The results show the following: (1) In all Chinese cities, both FER and IER have had a positive impact on GTI. The impact of FER has been much stronger than that of IER. They show a linkage effect, and their interaction (TER) has had a positive impact on GTI. (2) In terms of spatial heterogeneity, the impact of FER, IER, and TER on GTI has decreased across the east–west gradient and has been supplemented by a core–periphery structure. (3) In terms of urban heterogeneity, the impact of FER, IER, and TER has decreased with the size of the city. This study has the potential to strengthen the effect of environmental regulation on GTI. It can provide a decision-making reference for cities to coordinate FER and IER strategies, and provides evidence for adopting regionally differentiated environmental regulation strategies.