Cervical cancer (CC) is the most common gynecological malignant tumor. Immunotherapy has become a new model for the treatment of CC, especially advanced and recurrent cancer. At present, many studies are exploring the safety and efficacy of immunotherapy for advanced or recurrent CC. In this study, CIBERSORT was used to analyze the immune cell infiltration in CC patients, to evaluate the proportion of immune cell types in CC samples, to quantify the cell composition of the immune response, and to analyze its prognostic value. The expression profile datasets of CC were downloaded from the GEO. The differentially expressed genes (DEGs) between CC and normal cervical tissues were identified via R software (version 4.1.1), and their functions and pathways were enriched and analyzed. A protein–protein interaction network was constructed to screen the hub gene. Immune cell infiltration in CC was analyzed via scientific reverse convolution algorithm (CIBERSORT), and the hub gene was analyzed via survival analysis to screen the diagnostic biomarkers of CC. A total of 144 DEGs and 12 hub genes were identified. DEGs are mainly involved in molecular functions such as serine-peptidase activity, serine-hydrolase activity, and chemokine activity. The enrichment pathway is closely related to the interaction between viral proteins and cytokines and cytokine receptors, the interleukin 17 signaling pathway, and chemokine signaling pathway. The immune cell infiltration analysis showed that T cells were the main infiltrating immune cells in CC, especially T cells CD8+ and CD4+ . The survival analysis of the hub gene showed that CEP55, MCM2, RFC4, and RRM2 had high diagnostic value. CEP55, MCM2, RFC4, and RRM2 can be used as diagnostic markers for CC. CD8+ and CD4+ T cells are closely related to the occurrence and development of CC.