Ophiocordyceps sinensis is a precious Chinese traditional herb with a long medicinal history. This study used UPLC-MS metabolomics to explore and compare the metabolic profiles of the stroma (OSBSz), sclerotium (OSBSh), and mycelium (OSBS) of O sinensis to analyze their differential metabolites and identified potential active components. Then combined with network pharmacology and molecular docking to explore the mechanism of differential metabolites with anti-influenza properties. The results indicate that the stroma, sclerotium, and mycelium showed significant differences in metabolites. The key pathways for differential metabolites were butanoate metabolism, thiamin metabolism, alanine, aspartate and glutamate metabolism, citrate cycle, and arginine biosynthesis. Protein-protein interaction analysis identified potential targets, including SRC, RHOA, HSP90AA1, VEGFA, ITGB1, PRKCA, and ITGA1, and the key protective pathways in-volved PI3K-Akt, HIF-1, influenza A, and Coronavirus disease 2019. The molecular docking results showed that the core metabolite D-(−)-glutamine has high binding affinity with SRC, RHOA, and EGFR, re-flecting the multi-component and multi-target network system of O sinensis. In short, the combination of metabonomics, network pharmacology and macromolecular docking technology provides a new way to explore the anti-influenza research of O sinensis. This is undoubtedly an important theoretical support for the clinical application of O sinensis in the future.