Although previous studies have extensively explored the relationship between corporate profitability and innovation, the specific impact of profitability sustainability on corporate innovation has not received sufficient attention. Furthermore, while Corporate Social Responsibility (CSR) has been recognized as significantly influencing corporate innovation, its moderating role between profitability sustainability and innovation remains underexplored. This study fills these research gaps by empirically analyzing the impact of profitability sustainability on corporate innovation and examining in detail the multiple moderating effects of CSR. This paper employs Ordinary Least Squares (OLS) and Instrumental Variables Two-Stage Least Squares (IV-2SLS) methods, using data from dairy companies listed on China’s A-share and H-share markets from 2016 to 2021, to empirically analyze the impact of profitability sustainability on corporate innovation and to examine in detail the multiple moderating effects of CSR. The results indicate that profitability sustainability significantly promotes corporate innovation. CSR directly moderates this relationship, and along with other moderating variables (financing constraints, executive compensation), it plays a complex role in this interaction, potentially inhibiting the positive connection between profitability sustainability and innovation when acting alone, but significantly enhancing innovation when interacting with CSR. Heterogeneity analysis shows that non-state-owned and H-share listed dairy companies exhibit a more significant positive effect of profitability sustainability on innovation compared to state-owned and A-share listed companies. These findings highlight the key moderating role of CSR in promoting innovation within the dairy industry and offer new perspectives on how profitability sustainability can drive corporate innovation.