Environmental regulation is an effective environmental policy tool, which can balance the interests of the government, enterprises, and the public and can effectively address the internalization of environmental externalities. The digital economy has emerged as a brand-new force for the advancement of high-quality economic development. In order to successfully come true to high-quality economic development based on coordinated development of environmental protection and economic growth, the primary objective of this paper is to investigate whether environmental regulation promotes high-quality economic development from a digital economy perspective. This paper empirically analyzed the impact of environmental regulation on high-quality economic development in 236 Chinese cities from 2011 to 2019, using the mediation effect model, threshold regression model, and spatial Durbin model. The results demonstrated that environmental regulation has a significant positive effect on the general high-quality economic development. Specifically, formal environmental regulation has a positive nonlinear effect with decreasing marginal effect on high-quality economic development, whereas informal environmental regulation has a positive nonlinear effect with increasing marginal effects. The digital economy is an important path for environmental regulation to strengthen high-quality economic development. Environmental regulation and the digital economy jointly promote high-quality economic development. In spatial effects, formal environmental regulation has a negative spatial spillover effect on high-quality economic development, whereas informal environmental regulation has a positive spatial spillover effect. Based on these conclusions, it is proposed that the government should actively develop and strengthen the interaction mechanism between formal and informal environmental regulation, enhance the integration of digital platforms and environmental regulation, and develop a coordinated development mechanism for the environment and economy across regions.