At present, China is entering the era of digital economy. At the same time, "carbon peak" and "carbon neutral" are the main challenges. There is an urgent need to explore the role of the digital economy in reducing carbon emissions and environmental governance. In view of this, using the provincial panel data from 2011 to 2020, this paper makes an empirical study on the mechanism of the digital economy in environmental governance. It is found that with the growth of the digital economy, regional carbon emissions have decreased and the level of environmental governance has improved. After passing several kinds of robustness tests, this conclusion is still valid. The impact of the digital economy on environmental governance is heterogeneous. And the effect is even more obvious in the East. In addition, the transmission mechanism of strengthening environmental governance in the digital economy obviously benefits from the upgrading of industrial structure, the efficiency of capital allocation and labor allocation. Finally, according to the analysis and discussion of the results, some policy suggestions for developing countries to actively develop the digital economy and strengthen the effectiveness of environmental governance are put forward.