Financial support is essential for the sustenance and growth of corporations. In the contemporary corporate landscape, the importance of integrating Environmental, Social, and Governance (ESG) principles into strategic frameworks is increasingly recognized, with the role of bank competition in shaping corporate ESG performance becoming especially significant. This paper selects the data of A-share listed companies in China from 2010 to 2022 as a sample to empirically test the impact of bank competition on ESG performance and its mechanism. The study found that bank competition could improve the ESG performance of enterprises, a conclusion that holds enterprise after conducting a battery of robustness tests. The promotion effect is more significant in non-state-owned enterprises, small enterprises and enterprises in the central and eastern regions. Mechanism test shows that bank competition exerts its influence through “credit channel”, “investment channel” and “information channel.” Furthermore, increased marketization and enhanced corporate reputation are shown to amplify the positive effects of bank competition on ESG performance. This paper provides micro-level evidence for bank competition to enhance ESG performance of enterprises, and has implications for stimulating bank competition to promote enterprises to practice ESG performance and achieve sustainable development.