This study examines a Cournot duopoly when corporate social responsibility (CSR) firms endogenize the degree of commitment on consumer surplus. We establish the following results. First, when a CSR firm competes with a profit-maximizing firm, the Stackelberg equilibrium whereby the CSR firm is the leader is realized. Second, when two CSR firms compete, firm profit is lower and social welfare is higher than profit maximization. Furthermore, considering the linear demand and quadratic cost functions, we derive the equilibrium in duopoly and compare firm profit and social welfare under different duopolies.