This paper examines the impact of economic uncertainty on firms' overall environmental and social governance (ESG) performance in 3448 companies in 40 economies from 2006 to 2022. It is found that the overall ESG performance of corporations improves with increasing economic uncertainty for both, but more so in developed countries than developing countries. Higher competition further strengthens this relationship indirectly in developed countries but directly weakens it in developing countries. The results are also robust to run different model specifications, samples, and time selections. The findings are consistent with the Stakeholder Theory in developing country firms and a larger group of developed country firms. The results also highlight the substantial influence of economic uncertainty on corporate ESG policies, shedding light on the uncertainty-mitigating aspects of corporate ESG performance.