Tumor invasion and metastasis are the processes that primarily cause adverse outcomes in patients with cervical cancer. Cancer-associated fibroblasts (CAFs), which participate in cancer progression and metastasis, are novel targets for the treatment of tumors. The present study aimed to assess the heterogeneity of CAFs in the cervical cancer microenvironment through single-cell RNA sequencing. After collecting five cervical cancer samples and obtaining the CAF-associated gene sets, the CAFs in the cervical cancer microenvironment were divided into myofibroblastic CAFs and extracellular (ec)CAFs. The ecCAFs appeared with more robust pro-tumorigenic effects than myCAFs according to enrichment analysis. Subsequently, through combining the ecCAF hub genes and bulk gene expression data for cervical cancer obtained from The Cancer Genome Atlas and Gene Ontology databases, univariate Cox regression and least absolute shrinkage and selection operator analyses were performed to establish a CAF-associated risk signature for patients with cancer. The established risk signature demonstrated a stable and strong prognostic capability in both the training and validation cohorts. Subsequently, the association between the risk signature and clinical data was evaluated, and a nomogram to facilitate clinical application was established. The risk score was demonstrated to be associated with both the tumor immune microenvironment and the therapeutic responses. Moreover, the signature also has predictive value for the prognosis of head and neck squamous cell carcinoma, and bladder urothelial carcinoma, which were also associated with human papillomavirus infection. In conclusion, the present study assessed the heterogeneity of CAFs in the cervical cancer microenvironment, and a subgroup of CAFs that may be closely associated with tumor progression was defined. Moreover, a signature based on the hub genes of ecCAFs was shown to have biomarker functionality in terms of predicting survival rates, and therefore this CAF subgroup may become a therapeutic target for cervical cancer in the future.