Environmental, social, and governance (ESG) ratings are gaining momentum in China, but their capacity to induce green innovation among heavy polluters remains to be proven. Based on the green patent data from listed heavy-polluting enterprises in China from 2010 to 2020, this paper empirically analyzes the mechanism of ESG ratings and their impact on green innovation using a multi-temporal double-difference method. The findings indicate that ESG ratings effectively promote green innovation in heavily polluting firms. The mechanism test reflects that ESG ratings can enhance the enterprises’ green innovation capacities by alleviating their financing constraints and enhancing their corporate risk-taking abilities. Further analysis reveals that the incentive effect of ESG ratings on green innovation lies in considering both source control and end-of-pipe management by addressing their environmental responsibilities and actively engaging in green innovation activities. This facilitative effect is more significant in non-state-owned enterprises (NSOEs) and large-scale enterprises. Overall, these insights provide empirical evidence to advance green innovation in heavy-polluting enterprises.