The three distinct medicinal parts of Angelica sinensis (Oliv.) Diels (Ang) roots are the head, body, and tail (ARH, ARB, and ART, respectively). How endophytic fungi shape the differences in metabolic components among these parts remains unclear. We quantified the distribution of active components and endophytic fungi along the ARH, ARB, and ART and their relationships. Based on the metabolic components and their abundances detected via non-target metabolism, the different medicinal parts were distinguishable. The largest number of dominant metabolic components was present in ART. The difference between ART and ARH was the greatest, and ARB was in a transitional state. The dominant active molecules in ART highlight their effects in haemodynamics improvement, antibacterial, anti-inflammatory, and hormone regulation, while ARH and ARB indicated more haemostasis, blood enrichment, neuromodulation, neuroprotection and tranquilisation, hepatoprotection, and antitumour activities than that of ART. The ARHs, ARBs, and ARTs can also be distinguished from each other based on the endophytic fungi at the microbiome level. The most dominant endophytic fungi were distributed in ART; the differences between ART and ARH were the largest, and ARB was in a transition state, which is consistent with the metabolite distributions. Structural equation modelling showed that the endophytic fungi were highly indicative of the metabolic components. Correlation analysis further identified the endophytic fungi significantly positively correlated with important active components, including Condenascus tortuosus, Sodiomyces alcalophilus, and Pleotrichocladium opacum. The bidirectional multivariate interactions between endophytic fungi and the metabolic components shape their spatial variations along the longitudinal direction in the Ang root.