Promoting green development has emerged as a pivotal approach to optimizing the ecological and economic structure, thereby fostering sustainable development. Whether the implementation of environmental regulations in the Yangtze River Economic Belt (YREB), an important economic corridor in China, has increased the green total factor productivity (GTFP) of cities remains to be investigated. This paper uses Chinese city panel data from 2007 to 2019 to calculate the green total factor productivity (GTFP) of 107 cities in the Yangtze River Economic Belt using the super-efficiency SBM (Slacks-Based Measure) model and the GML (Global Malmquist-Luenberger) index and measures the intensity of environmental regulations through textual analysis. Through empirical analyses, this paper finds that environmental regulation has an inverted U-shaped effect on green total factor productivity (GTFP), which is first promoted and then suppressed, and the inflection point of the inverted U-shaped curve is about 0.51. Mechanism analyses show that environmental regulation in the Yangtze River Economic Belt promotes the growth of GTFP by facilitating green technological innovation but does not improve GTFP by enhancing the level of industrial structure. Heterogeneity analyses show that the effect of environmental regulation on GTFP is more significant in the city clusters in the middle and upper reaches of the Yangtze River and in cities outside the city clusters. Therefore, when formulating environmental regulation policies, the relationship between economic development and environmental protection should be balanced, while focusing on regional heterogeneity and adapting to local conditions, to coordinate the environment and economic development of the whole Yangtze River basin.