Efficient management of financial resources plays a crucial role in the healthy and sustainable growth of enterprises. In this study, Chinese A-share listed companies from 2012 to 2022 are selected as samples. Using text analysis technology, indicators of 'digital transformation' from corporate annual reports are identified and extracted to assess the extent of enterprise digital transformation. Then the impact of corporate digital transformation on corporate financial mismatch and its underlying mechanisms are systematically investigated. The study shows that enterprise digital transformation significantly alleviates the degree of corporate financial mismatch. This influence is achieved by easing enterprises' financing constraints, promoting technological innovation, and enhancing their level of social responsibility. The heterogeneity test shows that digital transformation has a greater mitigation effect on non-state-owned enterprises, enterprises with high degrees of industrial competition, enterprises with high degrees of regional marketization, and technology-intensive enterprises. The research conclusions provide micro-evidence for a deeper understanding of how digital transformation influences the misallocation of corporate financial resources. They also provide important insights for shaping digital economy policies and promoting high-quality development in the financial industry.