This paper takes 286 prefecture-level Chinese cities from 2011 to 2019 as research objects. It empirically examines the influence of digital finance on green development by using the EBM model, two-way fixed effect model, and instrumental variable method. It is found that digital finance can significantly promote the green development of Chinese cities, and this conclusion is still valid after the robustness tests, such as the instrumental variable method dealing with endogeneity and two-sided winsorization. The mechanism analysis results suggest that only the breadth of digital finance can significantly promote green development in the internal mechanism of digital finance, but the effect of coverage depth and digitization degree is not significant. The external mechanism of industrial structure upgrading assumes the mediating role of digital finance in improving the level of green development. The heterogeneity analysis results show that digital finance has a stronger impact on green development in the central and western cities and small-scale cities. This paper contributes to the study of the relationship between digital finance and green development and puts forward relevant suggestions.