Purpose In the context of the severe global challenges posed by climate and environmental issues, this paper aims to explore the connection between female Chief Executive Officers (CEOs) and the level of sustainable development in companies. This study aims to investigate the impact of female CEOs on corporate ESG performance and provide a detailed analysis of the underlying mechanisms. Design/methodology/approach This study uses a sample of listed companies from 2010 to 2021, as reported by Bloomberg. This study uses logit regression models to test hypotheses and conduct robustness tests using the generalized method of moments, propensity score matching and heckman two statge tests. Findings The research findings indicate that female CEOs can enhance a company’s ESG performance, primarily by elevating the level of green innovation and engaging in more philanthropic activities. When environmental uncertainty is high, the risk-averse attitude of female CEOs may diminish the enhancement of ESG performance. However, granting a higher proportion of equity to female CEOs incentivizes risk-taking, thereby strengthening the improvement of ESG performance. Further analysis reveals that the impact of female CEOs on ESG performance is more significant in non-state-owned enterprises, high-pollution industries, and companies with low financing constraints. Research limitations/implications The authors have shown that two key ways in which female CEOs enhance a company’s ESG performance are by increasing the level of green innovation and assuming more social responsibility. Nonetheless, this remains a shortcoming of this work, opening a door for future research to examine and enrich. There may be other possible mechanisms explaining the influence of female CEOs on corporate ESG performance. More research is warranted about the CEO’s additional traits, which were not considered in this study but may have an impact on a company’s ESG performance. Finally, while the analysis has delved into the moderating effects of external factors such as environmental uncertainty and CEO ownership on the influence of female CEOs on corporate ESG performance, there is room for exploring whether other factors also play a moderating role in future studies. Practical implications First, the findings of this study highlight the beneficial societal and economic effects of choosing female CEOs. The inclination to take on social responsibility and care for the environment are both higher among female CEOs. Furthermore, the authors have also discovered that female CEOs possess unique advantages in promoting corporate sustainability and enhancing ESG standards. This can contribute to breaking down stereotypes about gender roles in the workplace. Finally, this research shows that organizational heterogeneity and market risks have an impact on female CEOs’ capacity to improve company ESG performance. Originality/value A significant innovation of this paper lies in its unique focus on the connection between female CEOs and corporate ESG performance, along with the underlying mechanisms. Against the backdrop of sustainable development, the paper integrates social gender theory, upper echelon theory and agency theory into a comprehensive framework, shedding light on the influence of female CEOs on ESG performance and the associated mechanisms.