In developing countries, cervical cancer is still the major cause of cancer-related death among women. To better understand the correlation between tumor microenvironment (TME) and prognosis of cervical cancer, we screened 1367 differentially expressed genes (DEGs) of cervical cancer samples in The Cancer Genome Atlas (TCGA) database using Estimation of STromal and Immune cells in MAlignant Tumor tissues using Expression data (ESTIMATE) algorithm-derived immune scores. Then, we extracted 401 tumor immune microenvironment (TIME)-related DEGs that related to patients' survival outcomes. Protein-protein interaction (PPI) network and functional enrichment analysis revealed that the prognostic genes mainly participated in myeloid leukocyte activation, adaptive immune response regulation, and receptor signaling pathways. A total of 79 key prognostic DEGs were obtained through PPI network. A TF-lncRNA-miRNA-mRNA regulatory network was constructed to explore the potential regulatory mechanism. 4 genes (CCR7, PD-1, ZAP70, and CD28) were validated in another independent cohort of cervical cancer from the Gene Expression Omnibus (GEO) database. Finally, potential drugs for key prognostics DEGs were predicted using DrugBank. In conclusion, we obtained a list of potential prognostic TIME-related genes and potential predicted drugs by integrative bioinformatics approaches. A comprehensive understanding of prognostic genes within the TIME may provide new strategies for cervical cancer treatment.