The ESG scores of corporations is a crucial manifestation of their long-term strategic goals, attracting significant attention from society. The impact and underlying mechanisms of the enhancement of the social credit atmosphere on the ESG performance of corporations remain unclear. This study utilizes a sample of Chinese A-share listed companies from 2010 to 2020, employing the Difference-in-Differences (DID) methodology to investigate the relationship of the establishment of the social credit system on company ESG scores. This study reveals that the establishment of the social credit system significantly advances corporate ESG scores. Heterogeneity results indicate that the positive effect is more pronounced in state-owned enterprises or companies having substantial institutional shareholding. Furthermore, the implementation of the social credit system amplifies corporate ESG scores through three key mechanisms: fostering green technology innovation, cultivating ethical and moral corporate cultures, and optimizing the overall business environment. This paper enriches the informal institutional researches about the driving factors of corporate ESG scores, providing valuable insights for policymakers and corporate decision-makers.