Using panel data from 37 countries from 1990 to 2019 and applying a quantile regression approach with panel fixed effects, we investigate the impact of national Environmental, Social, and Governance (ESG) performance on green innovation and how this impact varies across different green innovation capacity distributions. The research conclusions are as follows. (1) National ESG performance improvement significantly promotes green innovation. (2) The improvement of environmental performance and governance performance significantly promotes green innovation, but in countries with weak green innovation capabilities, the improvement of social performance reduces the output of green innovation. (3) The role of national ESG performance in promoting green innovation is stronger in countries with weak green innovation capabilities. (4) In non‐high‐income countries, the stronger the green innovation capability is, the more obvious is the promotion of ESG performance to green innovation. The findings of this paper provide empirical evidence and a policy basis for governments to focus on improving ESG performance and to commit to promoting green innovation activities more effectively.