Cervical cancer (CESC) is the fourth most common and death-causing gynecological cancer, mostly induced by infection of human papillomavirus (HPV). Multiple components of the tumor microenvironment (TME), such as tumor infiltrating immune cells, could be targets of immunotherapy for HPV-related CESC. However, little is known about the TME of CESC until now. Here, we aimed to uncover the pathogenesis as well as to identify novel biomarkers to predict prognosis and immunotherapy efficacy for CESC. Combining the transcriptomic data and clinical characteristics, we identified differentially expressed genes in CESC samples from TCGA database by comparing the two groups with different ImmuneScore and StromalScore. Next, we detected ten key genes based on the PPI network and survival analyses with the univariate Cox regression model. Thereafter, we focused on CD3G, the only gene exhibiting increased RNA and protein expression in tumors by multiple analyses. Higher CD3G expression was associated with better survival; and it was also significantly associated with immune-related pathways through GSEA analysis. Furthermore, we found that CD3G expression was correlated with 16 types of TICs. Single cell RNA-sequencing data of CD3G in lymphocytes subgroup indicated its possible role in HPV defense. Hence, CD3G might be a novel biomarker in prognosis and immunotherapy for CESC patients.