In the era of digital economy, every enterprise has to face digitization, but there is limited literature to investigate the impact of enterprise digitization on ESG performance. This paper examines the impact of enterprise digitization on ESG performance using Chinese listed companies during 2012–2020. We find that the digitization of companies significantly improves ESG scores. Heterogeneity analysis shows that the positive effect is more pronounced for non-politically connected companies and companies located in regions with high quality institutions. We identify two channels through which digitization affects ESG performance. First, digitization enables companies to reduce agency costs and increase governance (G) scores. Second, digitization facilitates companies to improve goodwill and further increase social (S) scores. However, we do not find that digitization improves companies’ environmental (E) scores. The findings have important policy implications in motivating enterprises to engage more in ESG activities.