Drawing on transaction cost theories and the resource-based view of a firm, we posit that the value of corporate social responsibility (CSR) initiatives is greater in countries where an absence of market-supporting institutions increases transaction costs and limits access to resources. Using a large sample of 11,672 firm year observations representing 2445 unique firms from 53 countries during 2003-2010 and controlling for firm-level unobservable heterogeneity, we find supportive evidence that CSR is more positively related to firm value in countries with weaker market institutions. We also provide evidence on the channels through which CSR initiatives reduce transaction costs. We find that CSR is associated with improved access to financing in countries with weaker equity and credit markets, greater investment and lower default risk in countries with more limited business freedom, and longer trade credit period and higher future sales growth in countries with weaker legal institutions. Our findings provide new insights on non-market mechanisms such as CSR through which firms can compensate for institutional voids.