The need to improve corporate environmental performance has emerged as a crucial and urgent study topic as the world's pollution and climate challenges get worse. This trend has taken on new meaning and importance in light of the expanding digital economy and digital transformation. Using financial and associated data from 2009 to 2021 as the sample, this research empirically studies the link between digital transformation, green innovation, and environmental performance with a focus on China's A-share listed enterprises. According to the study's findings, digital transformation may improve a company's environmental performance by strengthening its capacity for green innovation. Furthermore, heterogeneity analysis shows that the effect of digital transformation in enhancing environmental performance is more prominent in high-tech enterprises, non-heavy polluting companies, and organizations with a greater percentage of party members in senior management.