Changes in the cellular secretome are implicated in virus infection, malignancy, and anti-tumor immunity. We analyzed the association between transcriptional signatures (TS) from 24 different immune and stromal cell types on the prognosis of HPV-infected and HPV-free head and neck squamous carcinoma (HNSCC) patients from The Cancer Genome Atlas (TCGA) cohort. We found that HPV-positive HNSCC patients have tumors with elevated immune cell TS and improved prognosis, which was specifically associated with an increased tumor abundance of memory B and activated natural killer (NK) cell TS, compared to HPV-free HNSCC patients. HPV-infected patients upregulated many transcripts encoding secreted factors, such as growth factors, hormones, chemokines and cytokines, and their cognate receptors. Analysis of secretome transcripts and cognate receptors revealed that tumor expression of IL17RB and IL17REL are associated with a higher viral load and memory B and activated NK cell TS, as well as improved prognosis in HPV-infected HNSCC patients. The transcriptional parameters that we describe may be optimized to improve prognosis and risk stratification in the clinic and provide insights into gene and cellular targets that may potentially enhance anti-tumor immunity mediated by NK cells and memory B cells in HPV-infected HNSCC patients.