Abstract This study examines the relationship between corporate ESG ratings and green innovation based on data from Chinese A‐share listed companies for the period between 2011 and 2022. The findings suggest a “U”‐ shaped relationship between ESG ratings and green innovation. Companies with lower ESG ratings (referred to as “bad” companies) tend to focus on improving their corporate governance and operational conditions, often at the expense of green innovation. However, as companies improve their ESG ratings, they increasingly view green innovation as a key growth area. This relationship is particularly evident in companies with low profitability and high operational risks. Additionally, we explore the impact of corporate ESG ratings on different types of green patents. The study finds that “bad” companies can mitigate the negative impact on green innovation through collaborative efforts, while non‐inventive green innovations, they benefit from independent research and development. Furthermore, the study examines the role of government subsidies and executive compensation in influencing this relationship. The results show that government subsidies can both positively and negatively affect green innovation, depending on the company's operational status and ESG rating. The results provide valuable insights for companies, investors, and policymakers regarding the significant role of ESG scores in promoting green innovation and suggest strategies to enhance corporate sustainability performance.