The global environment has been changing rapidly since the 21st century, and the harmonious coexistence between human beings and nature has been seriously challenged, and the green transformation of highly polluting enterprises has become a requirement of the times. Based on monthly corporate bond data and annual corporate financial data from January 2009 to December 2019 in China, this paper constructs a triple difference model to test the impact of carbon trading system on corporate bond credit spreads. The results show that, first, the carbon trading system has a reducing effect on the credit spreads of bonds of highly polluting companies in the carbon trading pilot region, and the implementation of the carbon trading system can promote bond financing in the green transformation process of highly polluting companies. Second, there is heterogeneity in the impact of the carbon trading system on the credit spreads of bonds of high-polluting firms, with private firms, small-scale firms and emerging firms having a greater reduction in corporate bond credit spreads than state-owned firms, large-scale firms and senior firms. Third, the carbon trading system exposes high-polluting firms to the risk of bankruptcy in the "carbon trading market" due to high operating costs and small net profits, thus incentivizing high-polluting firms to raise bonds in the "investment and financing market" to promote their green transformation.