This study investigates the impact of digital finance on corporate leverage ratios. The study employed a large sample of China's Shanghai and Shenzhen A-share non-financial listed enterprises from 2011-2020. The study's results depict that the development of digital finance can significantly reduce the leverage ratio of enterprises. We empirically identified that digital finance affects the difference in the term structure of the corporate leverage ratio. It was found that the development of digital finance has a significant negative impact on enterprises' short-term and long-term leverage ratios. Moreover, our heterogeneity analysis shows that the negative effect of digital financial development on corporate leverage ratios is different in state-owned and non-state-owned enterprises, large-scale and small-scale enterprises, and high-leverage and low-leverage enterprises. Mechanism analysis shows that the development of digital finance can reduce corporate leverage by lowering financing costs, alleviating financing constraints, and weakening non-systemic risks. Therefore, policymakers should focus on developing and adopting digital finance by creating a supportive regulatory environment, improving access to digital financial services, and encouraging innovation in the digital finance sector. Finally, our results remain robust after addressing endogeneity issues and conducting robustness checks.