Diversity and heat-adaptation of endophytic fungi (EF) and rhizospheric fungi associated with plants growing in geothermal ecosystems, Southwest China, as well as their benefit in improving host plant thermotolerances were investigated. A total of 1589 culturable fungi belonging to 38 taxa were isolated, in which Curvularia, Acrophialophora, Penicillium, and Aspergillus were the dominant genera. The Shannon indices of EF and rhizospheric fungi ranged from 1.80 to 2.56 and 0.73 to 2.11, respectively. Phylogenetic analysis indicated that the EF have a close relationship with rhizospheric fungi. However, some fungi exhibited apparently species-specific habitat distribution patterns. Growth temperature tests indicated that 60.22% of the tested isolates were thermotolerant fungi and only 39.78% were mesophiles, and the number of heat-adapted fungi increased with increasing environmental temperatures. The strain G1-29, which was isolated from the roots of Hedyotis diffusa and identified as Curvularia crepinii, significantly improved host plant thermotolerance under laboratory conditions: the death rate of endophyte-infected plants was significantly lower than that of endophyte-free plants (t-test, p = .0158, df = 4). Our results suggested that the EF and rhizospheric fungi associated with plants growing in geothermal ecosystems are diverse, and many of them have adapted to the high environmental temperatures. Some fungi have come to be the dominant endemic inhabitants of specific niches, and some played an important role in improving host plant thermotolerances.