Nasopharyngeal carcinoma (NPC) and oropharyngeal carcinoma (OPC) are subtypes of head and neck cancer with different treatment effects due to the heterogeneity of tumor microenvironments. This study was to investigate the distinctive tumor microenvironments of NPC and OPC. Analyzing single-cell data from 10 cases of each subtype, we reveal significant differences in cellular composition, with NPC microenvironment dominated by T/NK and B cells, and OPC characterized by prevalent epithelial cells and fibroblasts. Dynamic transitions of CD8 T cells are observed in both tumor types, involving shifts from naivety to cytotoxicity, proliferation, and eventual exhaustion/exhausted states. Additionally, Tregs exhibit heightened proliferative abilities in later developmental stages, concomitant with exhaustion. These highly proliferative T cells and Tregs manifest elevated glycolysis and lactate metabolism activities. Furthermore, we explore intercellular communication between glycolytic malignant epithelial cells and these proliferative T cells. These findings offer comprehensive insights into the heterogeneity of tumor microenvironments and provide a solid foundation for future therapeutic strategies and targeted interventions.