Economic high-quality development requires the harmonious integration of economic growth and environmental protection. Enterprises are not only an important force in achieving economic high-quality development, but also the main source of environmental pollution. The government bears the main responsibility for environmental management, and its behavior will inevitably affect the production decisions of enterprises. This study explores the impact of environmental regulation on enterprise high-quality development, using a sample of A-share listed companies in Shanghai and Shenzhen from 2013 to 2021. The study finds a U-shaped relationship between environmental regulation and enterprise high-quality development. This relationship is more significant in the samples of state-owned enterprises, heavily polluting enterprises, and local governments that rely less on tax revenues from key enterprises. The mechanism analysis from the perspectives of enterprises shows that environmental regulation promotes enterprise high-quality development by driving them to increase green investment, propel green innovation, and enhance environmental responsibility. Analyses from the perspective of government competition reveals that the pressure from high levels of government will slow the arrival of the turning point of environmental regulation, whereas public pressure and competition pressure from peer governments will accelerate it. This study provides some micro paths for the realization of economic high-quality development.