In this paper, we theoretically discuss and empirically investigate the impact of digital transformation on the ambidextrous innovation of enterprises. We also examine the transmission mechanism of knowledge flows between digital transformation and ambidextrous innovation in enterprises. Based on the data of Shanghai and Shenzhen-listed companies from 2012 to 2020, using a two-way fixed-effect panel regression model, the results show that: (1) Digital transformation has a significant positive effect on both enterprise ambidextrous innovation, and its effect on exploratory innovation is greater than that on exploitative innovation. (2) Digital transformation promotes exploratory and exploitative innovation by accelerating knowledge flow. (3) The impact of digital transformation on exploratory innovation in enterprises is heterogeneous, while the impact on exploitative innovation is not heterogeneous. That is, the positive effect of digital transformation on exploratory innovation is significant in enterprises in high-tech industries, but not significant in enterprises in nonhigh-tech industries. Overall, our findings provide a deeper understanding for enterprises to grasp digital opportunities and carry out digital transformation in a timely and appropriate manner, as well as an essential policy implication for the government to strengthen the construction of digital infrastructure and improve the policies related to digital transformation.