Digitization and greening are the vital driving force of China’s economic transformation. Whether they can drive collaboratively China’s economy is the key to realizing sustainable development. In this study, a super efficiency EBM model is applied to calculate the urban green economy development (UGED) level of 266 Chinese cities between 2011 and 2020, and then the dynamic SDM and intermediary effect models are employed to explore the impact and transmission mechanism of digital economy on UGED. Furthermore, it is also investigated whether digital economy and UGED have a nonlinear relationship. In the findings, digital economy is capable of significantly boosting UGED in the local city and its neighborhood, but significant differences exist in different regions and economic development stages. As a result of the transmission mechanism test, it may be found that digital economy could indirectly boost UGED through technology, structure, and allocation effects. The impact of digital economy on UGED has a double threshold due to the significant difference in the urban economic development level. The digital economy is increasingly contributing to UGED as the local economy develops. Therefore, local governments should develop digital economy in line with the local conditions so that its engine role in driving UGED can be given full play.