Esophageal squamous cell carcinoma (ESCC) is an aggressive and fatal malignancy that leads to epithelial cancer. The association between epithelial cell heterogeneity, prognosis, and immune response in this cancer remains uncertain. This study aimed to investigate epithelial cell heterogeneity in ESCC and develop a predictive risk model using the identified cell types. Single-cell RNA sequencing (scRNA-seq) and differential ESCC gene data were accessed from the Gene Expression Omnibus. Functional enrichment analysis, inferCNV, cell development trajectories, and intercellular communication were analyzed following epithelial cell characterization. Differentially expressed ESCC (n = 773) and epithelial cell marker genes (n = 3407) were intersected to obtain core genes, and epithelial cell-related prognostic genes were identified. LASSO regression analysis was used to construct a prognostic model. The external dataset GSE53624 was used to further validate the stability of the model. Drug sensitivity predictions, and immune cell infiltration were analyzed. Molecular docking clarified the possible therapeutic role of β-sitosterol in ESCC. Finally, wound healing assay, cell colony, and transwell assay were constructed to detect the effects of the core gene PDLIM2 on ESCC cell proliferation, invasion, and migration. Eight cell clusters were identified, and epithelial cells were categorized into tumor and paratumor groups. The tumor group possessed more chromosomal variants than the paratumor group. Epithelial cells were associated with multiple cell types and significantly correlated with the Wnt, transforming growth factor, and epidermal growth factor signaling pathways. From 231 intersected genes, five core genes were screened for use in the risk model: CTSL, LAPTM4B, MYO10, NCF2, and PDLIM2. These genes may contribute to the cancerous transformation of normal esophageal epithelial cells and thereby act as biomarkers and potential therapeutic targets in patients with ESCC. β-Sitosterol furthermore displayed excellent docking potential with these genes. Meanwhile, further experiments demonstrated that the gene PDLIM2 plays a major role in the progression of oesophageal squamous carcinoma. We successfully developed a risk model for the prognosis of ESCC based on epithelial cells that addresses the response of ESCC to immunotherapy and offers novel cancer treatment options.