Although prior studies have probed the determinants of corporate environmental, social, and governance (ESG) performance, limited works have deeply explored the role of firm-level political risk (PRISK) in determining ESG ratings and the moderator role of ownership structure on the PRISK–ESG performance nexus. Thus, this work endeavors to fill the gap by probing the impact of PRISK on aggregate corporate ESG performance and its pillars, namely environmental, social, and governance. In particular, the present study explores whether chief executive officer (CEO) duality has a moderating role between PRISK and ESG performance. Our sample focuses on 350 listed nonfinancial companies operating in the Standard and Poor's 500 index and performing both Tobit and Poisson panel data estimation methods between 2005 and 2022. Remarkably, we found that PRISK positively affects corporate ESG performance, supporting legitimacy theory. This indicates that a firm with higher political risk exposure prefers to engage more in ESG activities to gain legitimacy, increase its reputation, and achieve corporate success. Furthermore, the findings underscore that an increase in the level of CEO duality leads to a decrease in the positive effect of PRISK on ESG. The findings are robust after considering the various modifications that suggest significant policy implications for corporate executives and policymakers.