Drawing on stakeholder and agency theories, we analyzed whether optimum and aggressive environmental, social, and governance engagement alleviates/exacerbates firm risk with the moderating effect of executive compensation. We distinguished optimum and aggressive environmental, social, and governance engagement via a separate research model and subsequently applied the generalized method of moments based on 43,803 observations between 2002 and 2019. We found that while optimum environmental, social, and governance engagement is negatively associated with firm risk, aggressive environmental, social, and governance engagement is positively associated with firm risk. However, the moderating effect of executive compensation significantly weakened the positive association between aggressive environmental, social, and governance engagement and firm risk. Hence, corporate social responsibility contracting is key to reconciling the interests of stakeholders and shareholders.