Given the idea that financial institutions can have a significant impact on environmental performance, green credit, which essentially involves capital allocation under environmental awareness, is worth to be explored and implemented by banking sectors worldwide. This paper explores the impact of environmental awareness on firms' loan rates, with a focus on borrowers who have a record of environmental penalties. Using a comprehensive loan dataset from one of China's “Big Five” banks between 2010 and 2013, we employ the volatility of particulate matter 2.5 (PM2.5) as a proxy to measure environmental awareness. Our findings suggest that the volatility of air pollution has a positive effect on the floating ratio of the loan interest rate for firms with a history of environmental penalties. Furthermore, we find that this mechanism is particularly pronounced for private-owned enterprises (POEs), new loan customers, firms with low crediting ratings, and small-sized enterprises. We also confirm the role of environmental awareness in firms' loan costs by demonstrating that the volatility of air pollution is sensitive to variations in insolation duration, environmental attention, and PM2.5 monitoring stations. We suggest that the volatility of air pollution is a more meaningful indicator than the degree of air pollution, and that people's voluntary environmental awareness can transfer the environmental risk of firms to their internal operating costs. The significance of this study lies in its potential to aid policymakers and investors in advancing sustainable finance practices, as well as stimulating individual engagement with environmental awareness and prompting financial institutions to give greater importance to these issues.