We propose a theory of corporate social responsibility by linking it to the firm’s product markets. The firm’s product exhibits network effects in the sense that the product’s value to each consumer increases with the number of consumers. Moreover, with the technology development, the firm can adopt personalized pricing for each consumer. We show that such a firm could use social responsibility as a commitment device for low product prices, which helps overcome the coordination problem among consumers. In this way, the firm’s material payoff increases, supporting the notion of “doing well by doing good.”