The integrated development of green innovation and digital economy is crucial for addressing global climate change, promoting the application and popularization of digital technologies in the green sector, and achieving efficient, intelligent, and sustainable economic development and lifestyles. Using panel data from China’s listed enterprises from 2003 to 2021, this study examines the impacts of environmental regulations on green innovation in the low-carbon city pilot policy (LCCPP) context, which serves as a quasi-natural experiment in the digital economy. The results show that LCCPP effectively enhances enterprises’ green innovation by increasing enterprises’ environmental and research and development investments, and boosting digital transformation. Heterogeneity analysis reveals that the promotion effect of LCCPP on green innovation is highly pronounced for enterprises in the eastern region, for those with low financial constraints, and for technology-intensive enterprises. This effect is closely and positively correlated with the digital economy level in the regions where the enterprises are located. This study provides new empirical evidence for the relationship between environmental regulations and enterprises’ green innovation and discusses policy support for addressing global climate change challenges through environmental regulations in the digital economy context, thereby promoting global sustainable development.