Digital technology, renowned for its embeddedness and integration, revolutionizes governance ideas, institutions, and models. Based on the panel data of 285 cities in China from 2007 to 2021, a panel vector autoregressive model (PVaR) is built to reveal the interaction mechanism between digital technology and environmental regulation. The fixed-effects panel model explored the green impact of the coupling of digital technology and environmental regulation, considering the mediating role of industrial upgrading, factor allocation, and public participation. The results show that digital technology and environmental regulation promote each other. The coupling of digital technology and environmental regulation enhances urban green efficiency, especially in economically advanced and eastern regions. Industrial upgrading, factor allocation, and public participation mediate this effect. Therefore, government departments should build ecological civilization by improving environmental management decision-making, promoting the deep integration of digital technology and environmental regulation, and exploring a new path of urban green development.