The green finance policy is crucial for enterprises to participate in environmental governance actively. Taking the “Green Credit Guidelines” issued by China in 2012 as a quasi-natural experiment, this study investigated the impact of green finance policies on corporate environmental, social, and governance (ESG) performance by using a continuous Difference-in-Differences (DID) model based on the data of listed companies from 2006 to 2020. The conclusions are: (1) The green finance policy significantly improves corporate ESG, but the effects vary across enterprises. (2) The policy has encouraged enterprises to develop and adopt green products and technologies. Still, it has not had a positive effect on the treatment of enterprise pollutant emissions because the implementation of the policy makes enterprises pay more attention to front-end risk control than pollution treatment after production. (3) Research results have heterogeneity. The impact of green finance policies on enterprises at different levels of environmental regulation is different. Enterprises in areas with high intensity of environmental regulation are more vulnerable to green credit. The conclusion of this paper helps improve the green finance policy system, enhance the awareness and level of corporate ESG, and strengthen the collaborative governance of policies and enterprises on environmental issues in combination with the mandatory environmental regulations and incentive mechanisms to promote the green development of enterprises and realize the goal of carbon neutrality.