Promoting green development has become an important way to optimize the ecological and economic structure and promote sustainable development. The Yangtze River Economic Belt is an important economic corridor in China, and it remains to be examined whether the implementation of environmental regulations has enhanced the green total factor productivity (GTFP) of cities. This paper calculates the green total factor productivity of 107 cities within the Yangtze River Economic Belt by using the super-efficient SBM model and the GML index with Chinese city panel data from 2007-2019 and measures the intensity of environmental regulations through textual analysis. The bidirectional fixed-effects model constructed in this paper suggests an inverted U-shaped relationship between environmental regulation and GTFP, which is confirmed by a series of robustness tests. Green technology innovation and advanced industrial structure play a mechanism role in this. In regions with lower levels of green technology and industrial structure, the inverted U-shaped relationship between environmental regulation and green total factor productivity is more significant. In addition, the phenomenon of GTFP rising and then falling because of environmental regulation is more obvious in cities in the middle and upper reaches of the Yangtze River and outside the urban agglomerations. Therefore, when formulating environmental regulation policies, it is necessary to balance the relationship between economic development and environmental protection and harmonize the environment and economic development of the entire Yangtze River Basin.