Against the background of sustainable development policies, the ESG performance of Chinese manufacturing enterprises is still generally poor. As the leading enterprises in the manufacturing industry, state-owned enterprises should take the lead in responding to the national call for sustainable development and actively explore the path to improve their ESG performance. This study aims to explore whether and how state-owned manufacturing enterprises can improve their poor ESG performance through digital transformation in the digital economy. This study takes Shanghai and Shenzhen A-share state-owned listed manufacturing enterprises as the research sample and constructs an unbalanced panel. OLS regression analysis is used to empirically test the impact of digital transformation on the ESG performance of the sample firms. Further attempts are made to discuss the influence mechanism of digital transformation from the perspectives of dynamic capabilities and the institutional environment through stepwise and hierarchical regression methods, respectively. The study shows that, firstly, digital transformation is an important influencing factor in promoting the improvement of enterprises' ESG performance, and at the same time, there are significant structural differences in this influence. Second, under the dynamic capability perspective, digital transformation can improve corporate ESG performance through an absorptive feedback mechanism, matching response mechanism, and innovation efficiency enhancement mechanism. Third, from the perspective of the institutional environment, the informal system has a significant positive moderating effect on the relationship between digital transformation and ESG performance, i.e., the informal system and digital transformation have a synergistic governance effect on corporate ESG performance. The moderating effect of the formal institutional environment on digital transformation and ESG performance is not significant. The findings of the study clarify the controversy over the relationship between digital transformation and ESG performance of manufacturing state-owned enterprises and enrich the research on the influencing factors of corporate ESG performance. It also provides a theoretical foundation and empirical evidence for manufacturing SOEs to improve ESG performance and lead to sustainable development.