Gymnadenia conopsea has high economic value, and can be used as a medicinal and ornamental plant. Due to its low natural reproduction rate and overexploitation, the extinction of this plant is gradually accelerating. Understanding the composition and diversity of endophytic fungi is of great significance in promoting its propagation and the utilization of beneficial fungal strains. In this study, the diversity of fungal communities from roots, stems, leaves, fruits, and soils at four different elevations was studied with Illumina MiSeq sequencing. A total of 3,707,871 sequences were detected from all samples, and the number of clustering OTUs was 14,800. The OTUs were assigned to 4 phyla, 17 classes, 41 orders, 73 families, and 99 genera. The predominant fungal groups included Ascomycota and Basidiomycota, accounting for 33.71%-86.38% and 6.98%-58.30% of the total species, respectively. According to the alpha diversity index analysis, the diversity and richness of endophytic fungal communities in plant tissues at low altitudes were higher than those at high altitudes, while the diversity and richness of soil fungi were the opposite. In addition, principal coordinate analysis (PCoA) not only showed that the fungal community structure was correlated with altitude but also indicated tissue specificity of the community structure. Our study explored the composition of the endophytic fungal community among different tissues from different altitudes and included functional analysis, which might provide new ideas for saving the endangered species G. conopsea.