Abstract:[Background] Endophytes associated with halophytes have a wide range of activities, such as promoting plant growth, improving stress resistance, fixing nitrogen, and degrading toxic compounds. [Objective] To deeply understand the diversity, community structure, and potential roles of endophytic fungi of halophytes in the arid land. [Methods] Amplicon sequencing was performed for the endophytic fungi in two halophytes (Anabasis eriopoda and A. truncata) growing on the coast of the western Aral Sea in Uzbekistan. [Results] A total of 166 amplicon sequencing variants (ASVs) were obtained, representing 49 genera of 4 phyla, among which the dominant taxa were Neocamarosporium, Botryosphaeria, Alternaria and their higher taxa. The diversity and community composition of endophytic fungi showed significant differences between the two halophytes, which harbored potential novel taxa. Functional prediction by PICRUSt2 and FUNGuild demonstrated that the endophytic fungi in the two halophytes exhibited diverse roles and trophic modes, being host specific. [Conclusion] Our results suggest that the endophytic fungi in halophytes have high diversity and potential resource values and remain to be studied.