The alpha diversity of foliar fungal endophytes (FEs) in leaves of Betula ermanii in a subalpine timberline ecotone on Changbai Mountain, China increased with elevation. There were also significant differences in beta diversity along the elevation gradient. Among the environmental variables analysed, leaf carbon significantly increased with elevation, and was the most significant environmental factor that constrained the alpha and beta diversity in the FE communities. Tree height and the cellulose, lignin, and carbon/nitrogen ratio of the leaves also affected the FE assemblages. When controlled for the effects of elevation, leaf carbon was still the main driver of changes in evenness, Shannon diversity and FE community composition. The results offered clues of the carbon acquisition strategy of the foliar FEs across this cold terrain. There was strong multicollinearity between both annual precipitation and temperature, with elevation (|Pearson r| > 0.986), so the effects of these climatic variables were impossible to separate; however, they may play key roles, and the direct effects of both warrant further investigation. As pioneer decomposers of leaf litter, variations in diversity and community composition of FE measured here may feedback and influence carbon cycling and dynamics in these forest ecosystems.