In the context of China's pursuit of an ecological civilization, controlling haze pollution (HP) and enhancing environmental quality occupy a pivotal role. Addressing this issue, this study utilizes a dataset spanning from 2006 to 2020, encompassing 278 Chinese cities, to examine the impact and mechanisms of sustainable finance on HP management. This research innovatively constructs a Sustainable Finance Index and employs fixed effects models, mediation effect models, and spatial Durbin models for comprehensive empirical analysis. The findings indicate a significant negative relationship between sustainable finance and HP, with pronounced effects in cities experiencing severe haze, cities in the central and eastern regions of China, and non-provincial boundary cities. Mechanism analysis reveals that sustainable finance curtails urban haze formation through the optimization of energy consumption structure, enhancement of energy efficiency, and advancement of environmental technologies. This is primarily achieved through pollution source reduction and innovation effects. Additionally, the study uncovers a spatial spillover effect of sustainable finance in mitigating HP, peaking within a 500-km radius. This research not only provides new insights into the role of sustainable finance in the construction of ecological civilization but also offers empirical support for policymakers and stakeholders in formulating clean production policies, enhancing both the academic dialogue and practical policymaking in environmental management and sustainable development.