Based on micro-panel data of China's A-share listed companies from 2012 to 2022,this paper empirically analyzes the impact of financial flexibility on enterprise innovation performance and its transmission mechanism and further examines the moderating effect of enterprise ESG performance.The research shows that(1)financial flexibility can significantly improve enterprise innovation performance and this conclusion is still valid after a series of endogenous processing and robustness tests.(2)The mechanism test shows that financial flexibility mainly promotes enterprise innovation performance by alleviating corporate financing constraints,reducing corporate risk-taking,and increasing corporate inefficient investments.(3)The moderating effect test shows that spending on ESG may crowd out the financial resources required by operations,research,and development of the enterprise.In cases of low-quality ESG information disclosure and greenwashing,ESG may exacerbate information asymmetry and capital occupation,thereby hindering the promotion effect of financial flexibility on enterprise innovation performance.(4)The heterogeneity analysis shows that the promotion effect on enterprise innovation performance of financial flexibility is more significant for non-state-owned enterprises,companies in the eastern region,and those in high-tech industries.Further analysis shows that the promotion effect on enterprise innovation performance of cash flexibility is more pronounced than that of debt flexibility.This paper provides theoretical guidance and decision-making references for enhancing enterprise innovation performance and achieving the high-quality development of the economy in China.