Introduction Lung cancer (LC) ranks among the most prevalent malignant neoplasms globally. As a Traditional Chinese medicine (TCM), Herba Epimedii has been commonly used for treating LC. However, the specific mechanism of LC remains to be elucidated. Objectives This research aimed to explore the mechanisms of Herba Epimedii in treating LC according to molecular docking and network pharmacology. Materials and Methods The active components (ACs) and targets of Herba Epimedii were screened through the Traditional Chinese Medicine Systems Pharmacology (TCMSP) database. LC targets were retrieved from GeneCards and DisGeNET databases. Cytoscape v3.9.0 was employed to construct a “drug-component-disease-target” network. The STRING database and Cytoscape 3.9.0 software were utilized to establish a PPI network. The DAVID database was used for Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analyses. The AutoDock software was employed for molecular docking verification, and the Pymol software was applied for visual processing. Results Herba Epimedii acted on 108 LC treatment targets through 22 ACs. Five core components were screened, including quercetin, luteolin, kaempferol, anhydroicaritin, and 8-isopentenyl-kaempferol, while 12 core targets were screened, including TP53, AKT1, MYC, CASP3, ESR1, JUN, HIF1A, VEGFA, TNF, CCND1, EGFR, and IL-6. GO enrichment analysis mainly involved positive regulation of gene expression, positive regulation of the apoptotic process, enzyme binding, identical protein binding, macromolecular complex, nucleoplasm, etc. KEGG enrichment analysis mainly involved p53, interleukin-17, PI3K-Akt, and other signaling pathways. Five core components all demonstrated excellent binding activities with the core targets. Conclusion The mechanisms of Herba Epimedii in LC treatment may involve multiple components, targets, and pathways, inducing apoptosis, and inhibiting proliferation, invasion, metastasis, and drug resistance of LC cells.