PurposeThe aim of this paper is to explore the relationship between digital transformation and corporate fraud.Design/methodology/approachThis paper uses panel data of Chinese listed corporations from 2010 to 2021 and captures digital transformation from the perspectives of awareness and investment by extracting related content from annual reports. Our work investigates whether and how digital transformation influences corporate fraud and examines the moderating effects of the legal environment, media environment and privacy concerns.FindingsOur findings show that digital transformation, captured either from awareness or actual investment, can significantly alleviate corporate fraud. Our results are robust in a set of endogeneity tests and robustness checks. Additionally, we confirm that digital transformation alleviates corporate fraud through two mechanisms: improving internal monitoring and boosting information flow. Additionally, this alleviating effect is more pronounced for corporations with fewer privacy concerns and in worse legal and media environments.Practical implicationsOur findings provide insights for policymakers to motivate corporations to engage in digital transformation for fraud prevention. We also offer guidelines for corporations to improve their awareness and actual investments in digital transformation and take advantage of its governance effect in preventing corporate fraud.Originality/valueOverall, we highlight the governance role of digital transformation in alleviating corporate fraud and provide policy implications for regulators in emerging economies to regard digital transformation as an effective tool for fraud prevention.