This study employs leadership contingency theory and resource dependency theory, utilizing financial data from Shanghai and Shenzhen A-share listed companies between 2012 and 2021. Ultimately, data samples from 4,742 companies were selected to empirically examine the impact and moderating role of female executives on corporate digital transformation. Findings reveal that the proportion of female executives positively promotes corporate digital transformation. Further analysis indicates that female executives drive digital transformation by enhancing corporate innovation investment and risk control capabilities. Supported by the heterogeneity analysis, it shows that this effect is more pronounced in high-tech industries, non-state-owned enterprises, and companies in economically developed regions. This study provides a gender-perspective theoretical explanation for the drivers of digital transformation and offers practical insights for optimizing corporate executive teams.