The rapid development of the digital economy is driving transformative changes in a multifaceted collaborative environmental governance system. From the perspective of collaborative governance between government and the public, this study employs double fixed-effects models, spatial econometric models, and instrumental variables methods to empirically explore how the digital economy influences environmental pollution, using panel data from 30 provinces in China spanning 2011 to 2022. The results demonstrate that the digital economy significantly lowers environmental pollution. The primary mechanism is through the government’s environmental governance behaviors, which are positively moderated by public environmental concerns, enhancing effectiveness. Additionally, the digital economy induces a spatial spillover effect on environmental pollution. This promotion of collaborative management between the government and the public is poised to become a pivotal direction in future environmental governance.