This study examines how the digital transformation influences bankruptcy risk based on a dataset of Chinese listed firms from 2007 to 2022. Our findings reveal that there is a U-shaped relationship between digital transformation and bankruptcy risk. Additional analyses investigating different types of firms show that the U-shaped relation is more pronounced for non-SOE firms, firms in eastern region of China, and firms in high technology industry. This study provides valuable insights for firms to mitigate bankruptcy risk during the process of digital transformation.