In the new era of high-quality economic development, the digital economy offers fresh perspectives and momentum for China to achieve a harmonious balance between innovation-driven growth and environmental protection. We develop a systematic dynamic model to examine the effects of the digital economy on China's environmental quality. The findings indicate the following: (1) the digital economy initially suppresses but later promotes environmental quality; (2) by empowering primary, secondary, and tertiary industries, the digital economy advances industrial structure optimization and upgrading, leading to improved environmental quality; (3) the digital economy encourages the growth of R&D personnel and the accumulation of R&D capital stock, which fosters technological innovation and enhances environmental quality; (4) the synergistic development of the digital economy, industrial structure upgrading, and technological innovation offset the increase in energy consumption and pollution emissions caused by the digital economy's scale effect, representing the most favorable scenario for enhancing environmental quality. Plain Language Summary: How does the development of China's digital economy impact environmental quality? In the new era of high-quality economic development, the digital economy offers fresh perspectives and momentum for China to achieve a harmonious balance between innovation-driven growth and environmental protection. We develop a systematic dynamic model to examine the effects of the digital economy on China's environmental quality. The findings indicate the following: (1) the digital economy initially suppresses but later promotes environmental quality; (2) by empowering primary, secondary, and tertiary industries, the digital economy advances industrial structure optimization and upgrading, leading to improved environmental quality; (3) the digital economy encourages the growth of R&D personnel and the accumulation of R&D capital stock, which in turn fosters technological innovation and enhances environmental quality; (4) the synergistic development of the digital economy, industrial structure upgrading, and technological innovation offset the increase in energy consumption and pollution emissions caused by the digital economy's scale effect, representing the most favorable scenario for enhancing environmental quality. This study focuses on the overall development of China's digital economy and improving environmental quality without considering the significant regional disparities in economic development and environmental quality across different areas of China. Future research can conduct more detailed analyses on specific regions to provide more accurate policy guidance. [ABSTRACT FROM AUTHOR]