Sustainable development needs to rely on green innovation. Enterprise ESG performance rating to alleviate the information asymmetry between enterprises and investors, for the green innovation provides development opportunities. However, there is a lack of research on the mechanism of the two based on the perspective of financing constraints. Therefore, considering the theories of sustainable development, green innovation, financing constraints and stakeholders, the basic mechanism and non-linear mechanism of ESG and green innovation are explored, aiming to provide reference for playing the role of ESG performance in promoting green innovation. The results show that better ESG performance can significantly promote the output of green innovation, and this promoting effect exists for both high-end green innovation and low-end green innovation, and its main channel is to alleviate financing constraints. In addition, this incentive exists a double threshold of digital finance and a single threshold of enterprise scale. Perfect digital finance and larger enterprise scale will strengthen the incentive effect of enterprise ESG performance on green innovation output. Considering financing constraints, this study further clarifies the relationship between enterprises ESG performance and green innovation, enriching the theoretical framework of green innovation and offering a new pathway for advancing green innovation among Chinese enterprises.