Climate change causes upward shift of forest lines worldwide, with consequences on soil biota and carbon (C). Using a space-for-time approach, we analyse compositional changes in the soil biota across the forest line ecotone, an important transition zone between different ecosystems. We collected soil samples along transects stretching from subalpine mountain birch forests to low-alpine vegetation. Soil fungi and micro-eukaryotes were surveyed using DNA metabarcoding of the 18S and ITS2 markers, while ergosterol was used to quantify fungal biomass. We observed a strong shift in the soil biota across the forest line ecotone: Below the forest line, there were higher proportions of basidiomycetes and mucoromycetes, including ectomycorrhizal and saprotrophic fungi. Above, we observed relatively more root-associated ascomycetes, including Archaeorhizomycetes, ericoid mycorrhizal fungi and dark septate endophytes. Ergosterol and percentage C content in soil strongly and positively correlated with the abundance of root-associated ascomycetes. The predominance of ectomycorrhizal and saprotrophic fungi below the forest line likely promote high C turnover, while root-associated ascomycetes above the forest line may enhance C sequestration. With further rise in forest lines, there will be a corresponding shift in the belowground biota linked to C sequestration processes.