To enhance environmental governance for sustainable development, China has made efforts to address environmental issues through formal institutions. The enactment of the new Environmental Protection Law (EPL) in 2015 exerted new institutional pressures on heavy-polluting firms. Our study focuses on examining the phenomenon of greenwashing among these firms after the implementation of EPL. Using difference-in-difference model, we identify that EPL results in an increase in greenwashing behavior by heavy-polluting firms. Furthermore, our research reveals that while EPL implementation enhances disclosure performance in heavy-polluting firms, there is no tangible improvement in substantive environmental performance. These results are supported by various robustness tests that affirm their reliability. Additionally, we uncover that government subsidies exacerbate greenwashing in heavy-polluting firms. In contrast, the availability of slack resources diminishes the impact of EPL on greenwashing behavior. This study not only enhances the understanding of the mechanism of the impact between EPL and firm greenwashing, but also offers suggestions to help the government for better environmental governance as well as firms to engage in environmental behaviors and sustainability.