Religion, as an important part of China's history and culture, plays an important role in economic and social life. In the context of China's reality, which emphasizes high-quality development, this study aims to explore the impact of the informal institution of religious atmosphere on the environmental, social and governance (ESG) performance of firms. Through empirical research, this paper finds that: the stronger the religious atmosphere of a firm's location, the better its ESG performance; further, this paper examines the path of the influence of religious atmosphere on firms' ESG performance. The results show that religious atmosphere promotes the ESG performance of firms through two paths: suppressing managers' self-interested and short-sighted behaviors and creating an ethical environment. Meanwhile, the weaker the degree of marketization (formal system) in the region, the more obvious the role of religion (informal system) in promoting firms' ESG performance, which suggests that there is a certain substitution relationship between religious traditions and formal system. In addition, family business can further enhance the role of religion in promoting firms' ESG performance. Finally, this paper segments different religions and finds that Taoism's emphasis on man and nature makes it better than Buddhism in promoting ESG performance, especially in environmental performance. This study not only provides empirical evidence for the use of ESG at the micro level, but also provides empirical evidence for the high-quality development of firms in the context of Eastern religions in China.