The expression of CD39 on CD8+ T cells in the CK+ region was higher in cancer tissue than in paracancerous tissue (p = 0.011), and high CD39-expressing CD8+ T cells in the CK+ region (HR, 2.587; p = 0.033) and high CD39-expressing CD8+ T cells in the CK− region (HR, 3.090; p = 0.008) were independent risk factors for prognosis in ESCC patients; the expression of ENTPD1 was upregulated in ESCC tissues compared to normal tissues (adjusted p < 0.001; log2 fold change = 1.99), and its expression was significantly positively correlated with the expression of PDCD1, CTLA4, and HAVCR2. Here, HAVCR2 is linked to esophageal squamous cell carcinoma.