Abstract:[Background] Endophytic fungi capable of promoting plant growth, enhancing plant tolerance to drought, and improving plant resistance to diseases have significant research and utilization values, especially for the growth of orchid plants. [Objective] To systematically analyze the diversity and reveal the community structure of fungi in the roots and rhizosphere soil of Dactylorhiza hatagirea, so as to provide a reference for further exploring the associations between D. hatagirea and fungi. [Methods] The Illumina Miseq high-throughput sequencing was employed to analyze the diversity of fungi in the roots and rhizosphere soil of D. hatagirea. [Results] The endophytic fungi in the roots of D. hatagirea belonged to 89 genera of 7 phyla, with the dominant genera being Epulorhiza (16.93%), Cephaliophora (10.41%), Saccharomyces (5.73%), Ceratobasidium (5.32%), and Fusarium (5.12%), among which Epulorhiza and Ceratobasidium were mycorrhizal fungi in orchid plants. The fungi in the rhizosphere soil belonged to 269 genera of 11 phyla, with the dominant genera being Fusarium (8.09%), Neonectria (6.79%), Plectosphaerella (3.39%), and Mortierella (3.01%). The diversity of fungi in the rhizosphere soil of D. hatagirea was significantly higher than that in the roots. [Conclusion] This study revealed the fungal composition in the roots and rhizosphere soil of D. hatagirea in Inner Mongolia, enriching the endophytic fungi resources of this medicinal plant. The findings help to promote the research on endophytic microorganisms in the medicinal plants with limited resources, alleviate the shortage of Chinese medicinal herb resources, and protect and reasonably develop wild medicinal plant resources.