PurposeAmidst the rapid development of the global digital economy, digital transformation has become a strategic choice that firms must use to respond to the changing times. This study analyzes the impact of digital transformation on corporate environmental, social and governance (ESG) performance.Design/methodology/approachThis study analyzes the impact of digital transformation on corporate ESG performance.FindingsUsing panel data from Chinese A-share-listed companies from 2010 to 2019, the authors found that digital transformation has a positive impact on corporate ESG performance, especially for high-tech firms and state-owned firms. In particular, the authors find that the digital production and digital marketing exert a positive effect on corporate ESG performance. Mechanism tests showed that digital transformation helps promote corporate green innovation, improve information transparency and improve corporate governance, thus enhancing ESG performance. A moderating effect analysis revealed that the positive impact of digital transformation on ESG performance is more significant in firms with government subsidies and chief executive officers (CEOs) with rich career experience.Originality/valueMost existing research has confirmed the positive effect of digital transformation on firms' financial performance, whereas fewer studies have focused on the impact of digital transformation on the non-financial performance of firms.