Abstract This study investigates the role of corporate social responsibility (CSR) in either facilitating or hindering the innovation performance of high‐tech enterprises undergoing digital transformation. By empirically analyzing data from 11,107 high‐tech enterprises listed on the Shanghai and Shenzhen stock exchanges between 2007 and 2020, the research aims to clarify the impact of CSR on corporate innovation. The results show a positive correlation between digital transformation and firm innovation performance. In addition, the study identifies a significant mediating effect of research and development (R&D) investment intensity, suggesting that increased R&D investment enhances the benefits of digital transformation. However, it also finds that CSR implementation negatively moderates this relationship, suggesting that an excessive focus on CSR can be economically burdensome and potentially detrimental to innovation efforts. These findings provide valuable insights into the complex interplay between digital transformation, R&D investment, and CSR in high‐tech firms.