Introduction Head and neck squamous cell carcinoma (HNSCC) is the sixth most common cancer worldwide, but its pathogenic mechanisms remain unclear. This study aimed to identify the potential biomarkers underlying the diagnosis and treatment of HNSCC. Methods Weighted gene co-expression network analysis (WGCNA) followed by pathway enrichment analysis, analysis of infiltrating immune cells, survival analysis, and methylation analysis were applied to identify the potential hub genes underlying the prognosis of HNSCC. The expression of hub genes was validated by immunofluorescence staining. Results A total of 10,274 differentially expressed genes (DEGs) were identified. Through WGCNA, the yellow module ( R2 = 0.33, P = 2e-14) was confirmed to be the most significantly associated with the histological grade of HNSCC, and the “Cell Cycle” proved to be the most enriched signaling pathway. Based on the results of survival analysis and immune cell infiltration, 10 hub genes ( HMMR, CENPK, AURKA, CDC25C, FEN1, CKS1B, MAJIN, PCLAF, SPC25, and STAG3) were identified. Eight of these (excluding MAJIN and STAG3) were confirmed by performing survival analysis using another dataset (GSE41613). Further, we identified 4 methylation loci in 3 hub genes (cg15122828 and cg20554926 in HMMR, cg12519992 in CDC25C, and cg2655739 in KIAA0101/PCLAF) as being significantly related to survival. Finally, we demonstrated the high mRNA and protein expression of HMMR and CDC25C in HNSCC patients. Conclusion Two real hub genes ( HMMR and CDC25C) and 3 methylation loci were identified that could potentially serve as prognostic and therapeutic targets for HNSCC, which is significant for studying the pathological mechanisms underlying HNSCC and for developing novel therapies for this disease.