BackgroundPanax quinquefoliusL. (American ginseng) is widely used in medicine due to its wealth of diverse pharmacological effects. Endophytes colonize withinP. quinquefoliusin multiple tissue types. However, the relationship between endophytes and the production of their active ingredients in different parts of the plant is not clear.ResultsIn this study, the relationship of endophytic diversity and the metabolites produced in different plant tissues ofP. quinquefoliuswere analyzed using metagenomic and metabolomic approaches. The results showed relatively similar endophyte composition in roots and fibrils, but obvious differences between endophyte populations in stems and leaves. Species abundance analysis showed that at the phylum level, the dominant bacterial phylum was Cyanobacteria for roots, fibrils, stems and leaves, Ascomycota forroots and fibrils roots, and Basidiomycota for stems and leaves. LC-MS/MS technology was used to quantitatively analyze the metabolites in different tissues ofP. quinquefolius. A total of 398 metabolites and 294 differential metaboliteswere identified, mainly organic acids, sugars, amino acids, polyphenols, and saponins. Most of the differential metabolites were enriched in metabolic pathways such as phenylpropane biosynthesis, flavonoid biosynthesis, citric acid cycle, and amino acid biosynthesis. Correlation analysis showed a positive and negative correlation between the endophytes and the differential metabolites. Conexibacter significantly enriched in root and fibril was significantly positively correlated with saponin differential metabolites, while cyberlindnera significantly enriched in stem and leaf was significantly negatively correlated with differential metabolites (p < 0.05).ConclusionThe endophytic communities diversity were relatively similar in the roots and fibrils ofP. quinquefolius, while there were greater differences between the stems and leaves. There was significant difference in metabolite content between different tissues ofP. quinquefolius. Correlation analysis methods demonstrated a correlation between endophytes and differential metabolism.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12870-023-04282-z.