Upgrading the industrial structure and improving the quality of the ecological environment are important strategic steps to realize the modernization of China. Based on the panel data of 11 provinces (municipalities) in China’s coastal areas from 2010 to 2019, this paper uses the spatial Dubin model and the threshold effect model to study the impact of industrial structure upgrading on eco-environmental quality. The results show that the influence of industrial structure upgrading on ecological environment quality has a positive “U”-shaped distribution. Based on the spatial econometric model, it is found that the rationalization of industrial structure and the optimization of industrial structure have spatial spillover effects on the ecological environment quality, and the influence of the rationalization of industrial structure and the optimization of industrial structure on the ecological environment quality of the surrounding area is positive “U”-shaped and inverted “U”-shaped, respectively. Based on the threshold model, it is found that industrial structure rationalization has a small effect on the ecological environment’s quality when the degree of scientific and technological innovation is low. When scientific and technological innovation reaches a certain threshold, industrial structure rationalization has a significant effect on the quality of the ecological environment. In addition, from a regional perspective, the influence of industrial structure rationalization in the East China Sea and the South China Sea and industrial optimization in the Bohai-Yellow Seas on the eco-environmental quality of the surrounding areas has a positive “U”-shaped distribution, while the influence of the optimization of industrial structure in the South China Sea on the eco-environmental quality of the surrounding areas has an inverted “U”-shaped curve on the left side.