This paper explores the relationship between subjective perception of economic policy uncertainty (SPEPU) and ESG performance. We find that SPEPU could deteriorate ESG performance, especially corporate social performance and that this negative effect works through increasing financialization and weakening internal control, but could be mitigated by enhancing digital transformation and improving financial flexibility. Heterogeneity analysis further confirms that this negative effect of SPEPU on ESG performance is more pronounced for enterprises with no political connections, less information transparency and low marketization. Our conclusions are of practical significance for enterprises to maintain good ESG performance and promote their sustainable development.