Coarse woody debris (CWD) provides food and shelter to a large proportion of forest biota and is considered vital for biodiversity during periods of harsh weather. However, its importance in long-term stressed ecosystems remains largely unknown. In this work, we explored the contribution of CWD to fungal diversity along the gradient of boreal forest degradation caused by 77 years of heavy industrial emissions. We analyzed the diversity and composition of fungi in 270 samples of well-decayed Picea abies and Abies sibirica logs, as well as forest litter both adjacent to and distant from the logs. Compared with forest litter, the wood had higher water content and possessed substantially lower concentrations of heavy metals, which suggests its potential favorability for biota in polluted areas. The pollution-induced loss of fungal diversity in forest litter reached 34% and was stronger in the microhabitats not influenced by CWD. Meanwhile, wood fungal communities lost less than 10% of their total richness and even increased in alpha diversity. These processes led to the diversity and compositional convergence of fungal communities from different microhabitats and substrates in polluted areas. Despite this, the importance of wood and CWD-influenced microhabitats for fungal diversity maintenance was low. Apart from wood-associated fungi, the taxa whose diversity increased in the wood of polluted areas were ectomycorrhizal fungi and eurytopic soil saprotrophs (Mucoromycota, Mortierellomycota, Eurotiomycetes, and Helotiales) that easily tolerate highly toxic litter. Within the majority of pollution-sensitive soil saprotrophic groups, only terricolous Tricholomataceae benefit from CWD as microrefugia. Upon considering the ecological variability within low-rank taxa, the importance of decayed logs as safe sites can be high for certain soil-inhabiting fungal groups in polluted areas.