This article investigates the role of corporate social responsibility (CSR) in eco‐innovation from the triple bottom line perspective. We unpack CSR into three dimensions (financial, social, and environmental) and categorise eco‐innovation into two kinds (pollution prevention and sustainable environmental innovation) to get a comprehensive picture of the relationship. Drawing on the resource‐based view, we suggest that the environmental dimension of CSR is positively related to pollution prevention because the returns on this kind of innovation are more predictable and straightforward, which appeals to firms. We also suggest that there is a U‐shaped relationship between the environmental dimension of CSR and sustainable environmental innovation, as this kind of innovation can only be realised when environmental commitments are high. Moreover, we expect the social and financial dimensions of CSR to interact with the environmental dimension to affect eco‐innovation. Using Chinese firm data from 2011 to 2015, we find that the social and financial dimensions of CSR have a positive moderating effect on sustainable environmental innovation. However, we fail to find support for their moderating effect on pollution prevention. Theoretical and practical implications, based on the findings, are discussed.