IntroductionOphiocordyceps gracilis, a type of edible and medicinal fungus, exhibits multiple health‐promoting effects. Due to the scarcity of natural O. gracilis, artificial cultures have been developed as its substitutes. However, lacking comprehension of the metabolite composition of cultures limits its utilisation.ObjectiveThis research aimed to evaluate the nutritional and medicinal value of four cultures of O. gracilis by analysing their metabolite composition. In addition, metabolic pathways in mycelia and fruiting bodies were analysed to explore fruiting body formation mechanism at metabolic level.MethodThe mycelia, fermentation broth, spore powder and fruiting bodies of O. gracilis were cultivated in this study. Their metabolite composition was compared using an untargeted metabolomics approach based on liquid chromatography–tandem mass spectrometry (LC–MS/MS).ResultsPrincipal component analysis (PCA) and orthogonal projections to latent structures discriminant analysis (OPLS‐DA) showed that the four cultures have noticeable differences in metabolite composition. A total of 612 metabolites were identified, among which 159 metabolites showed significant differences, and these differential metabolites were classified into 13 categories. The metabolites in the fruiting bodies were the most abundant compared with other cultures. However, each culture had its own advantages and significantly accumulates some active metabolites respectively. Pearson's correlation analysed the mutual relationship among metabolites. In addition, seven metabolic pathways were closely related to fruiting body formation, such as “Biosynthesis of plant secondary metabolites”, “amino acids metabolism”, “tricarboxylic acid (TCA) cycle”.ConclusionThis study offered a reference to mycelia, fermentation broth, spore powder and fruiting bodies of O. gracilis as health‐promoting functional foods and medicine.