China's economic trajectory has transitioned from prioritizing rapid growth to emphasizing quality, efficiency, and sustainability. In this context, balancing environmental protection with the promotion of a green economy has become increasingly significant. This study investigates the relationship between environmental regulation and green innovation in Chinese enterprises using data from listed companies spanning 2007 to 2019. The results indicate that environmental regulations positively influence green innovation among firms, a finding validated by robustness checks, including instrumental variable methods. Furthermore, the study identifies corporate greenwashing behaviors and environmental, social, and governance (ESG) performance as mediating factors. Firms resort to greenwashing strategies to mitigate regulatory pressures while simultaneously fulfilling their ESG responsibilities, thus contributing to green innovation. Additionally, the study reveals that the impact of environmental regulations on green innovation is heterogeneous, varying according to the external economic environment, firm ownership, and industry characteristics. The positive effect is more pronounced under lower levels of government intervention, in private enterprises, and among energy and new energy sectors. These findings underscore the nuanced dynamics between regulatory frameworks and corporate innovation in China.