Thuja sutchuenensis Franch., an endangered species sparsely distributed in the mountainous and arid regions of southwest China, faces the critical challenge of adapting to these harsh conditions. Understanding the plant’s strategies for survival and the precise roles played by soil fungal communities in this adaptation remains an area of limited knowledge. Our investigation centers on the fungal communities associated with T. sutchuenensis and their interactions with soil water content. Notably, we identified unique fungal communities in the low soil moisture group, and these communities exhibited lower coverage but higher phylogenetic diversity (PD), Chao1, and Shannon indices compared to other groups. Network analysis revealed a modular structure within the fungal communities, with key hub nodes identified, particularly in the arid group. This group demonstrated higher levels of soil saprotrophs and ectomycorrhizal fungi and a reduced presence of plant pathogens. Linear discriminant analysis highlighted the significance of genera such as Russula, Myxotrichaceae, and Sebacina, emphasizing their roles in supporting the plant in arid environments. Random forest analysis indicated that soil moisture content emerged as the primary driver in determining fungal composition and diversity and contributed to the variables of several fungal genera. Collectively, this study provides valuable insights into the fungal communities associated with T. sutchuenensis, shedding light on their adaptation to extreme arid conditions.