The current research delves into the correlation between corporate social responsibility (CSR) and the environmental performance (EP) of manufacturing enterprises in China. In addition, we examined the mediation impact of green innovation practices (GIP) on the interaction between CSR and EP. The study also looked at competitive advantage (CPA) as a moderator to see how it influences the connection between CSR and EP in dynamic capability view theory (DCV). A structured questionnaire was adapted to collect data from 910 manufacturing companies in Zhanjiang city, in Jiangsu province, China. The partial least squares (PLS-SEM) methodology analyzed the theoretical framework. The empirical findings are as follows: (1) CSR is a crucial predictor of EP. (2) GIP has a direct impact on EP. (3) GIP acts as a mediator in the CSR-EP connection, and (4) Lastly, the CPA strongly enhances the interaction between CSR and EP. These findings contribute practically and theoretically to understanding how CSR fosters EP, emphasizing the necessity for manufacturing companies to institute policies and initiatives for environmental sustainability and prioritize ecologically friendly practices to enhance EP.