With the continuous emergence of digital technology, the transformation and upgrading of enterprise digitalization has become the focus of the industry. This paper takes all A-share listed enterprises in China’s capital market from 2010 to 2021 as the sample, to test the impact of digital transformation on risk-taking. The research finds that digital transformation significantly promotes risk-taking level. Further analysis shows that the impact of enterprise digitalization on risk-taking has obvious heterogeneity, the positive impact is more significant in non-heavily polluting enterprises, small-scale enterprises and non-state-owned enterprises; investment efficiency and cost stickiness moderate the above relationship; digital transformation enhances risk-taking by improving managerial ability, strategic deviance and asset utilization. Our study provides enlightenment for enhancing the risk-taking level.