Pinus squamata is a rare and endangered tree endemic to northeastern Yunnan Province, China, and it is listed as a Plant Species with Extremely Small Populations (PSESP) in China for requiring urgent conservation. Furthermore, the actions of ex situ conservation and reintroduction based on artificial propagation have been carried out since some 15 years ago. The rhizosphere microbiome plays an important role in soil quality and plant health. However, how the fungal communities of the rhizosphere differ between wild, ex situ, and reintroduced examples of Pinus squamata remains unclear. Illumina sequencing of the internal transcribed spacer 2 (ITS2) region was used to investigate fungal communities in the P. squamata rhizosphere soil. Rhizospheric fungal community composition, structure, diversity, and ecological function in the soil surrounding wild, ex situ, and reintroduced P. squamata individuals were elucidated. The ex situ site Kunming (EK) had the highest fungal community richness and diversity. The samples collected from six different sites were well separated (R = 0.95, p = 0.001), suggesting significant differences between the sites. Soil total potassium (TK), available phosphorus (AP), and pH were the main factors driving fungal community (0.01 < p ≤ 0.05). Prediction of fungal functional guild in the P. squamata rhizosphere demonstrated that the fungi could be classified as ectomycorrhizal, endophyte, and plant pathogenic fungi. Our research will provide a basis to guide the further selection of conservation sites for P. squamata based on fungal diversity and offer guidance on the antagonistic fungi and plant pathogenic fungi that may be of relevance to the conservation of this rare plant.