The rapid evolution of digital technology has made it necessary to examine the digital transformation and firms’ innovation initiatives. However, prior studies have often oversimplified the relationship between ‘digital transformation’ and ‘innovation’ as linear. By integrating perspectives from search and recombination, attention-based views, and competitive strategy theory, this paper constructs a theoretical framework, revealing that the relationship between digital transformation and innovation is nonlinear. We analyzed 21,509 observations from 2,565 Chinese listed companies spanning the period from 2009 to 2019 and found an inverted U-shaped relationship between digital transformation and innovation. We also discovered that differentiation strategies and cost leadership strategies have different moderating impacts on this inverted U-shape. This study provides valuable insights for businesses seeking to effectively navigate the complexities of digital transformation and innovation.