Centipeda minima (CM) is a traditional Chinese herbal medicine used for the treatment of sinusitis and rhinitis, and it possesses anti-cancer properties. However, the mechanism of CM in the treatment of nasopharyngeal carcinoma (NPC) remains unclear. This study aimed to explore the mechanism of CM in the treatment of NPC using a network pharmacology approach. The active components and targets of CM and NPC were screened using TCMSP, SwissTarget, and GeneCards database. The association between CM components and NPC targets or pathways was analyzed using String, Cytoscape 3.9.1, David 6.7, and AutoDock Vina. The Sangerbox platform was used to conduct differential expression and Kaplan-Meier survival analysis of core genes. We identified 17 active compounds of CM and 146 corresponding targeted proteins in NPC. These targets may modulate pathways in cancer, PI3K-Akt, apoptosis, prolactin, relaxin, and TNF signaling. The top 5 core genes of the PPI network were found to be AKT1, STAT3, CASP3, EGFR, and SRC, which may be the main targets of CM in treating NPC. Molecular docking confirmed the binding energies of quercetin with CASP3, 8-Hydroxy-9,10-diisobutyryloxythymol with AKT1, and plenolin with AKT1, which were particularly low, suggesting robust and stable interactions. The expression levels of AKT1, CASP3, EGFR, SRC, MMP9, CCND1, and PTGS2 were significantly higher in head and neck squamous cell carcinoma (HNSC) samples compared to normal samples. In addition, the hub genes could predict the prognosis of HNSC as the Kaplan-Meier survival curve showed that patients with lower expressions of AKT1, STAT3, CASP3, EGFR, MMP9, ESR1, PTGS2, and PPARG had better overall survival. By conducting a network pharmacology approach, we revealed the main ingredients, key targets, and regulatory pathways of Centipeda minima in the treatment of NPC.