BMP1, EGFR, S100A12, HLA-B, TNFSF18, IL1B, MAPT and OXTR were significantly related to sex, TNM stage or survival outcomes of ESCC or EAC patients (p < 0.05). The gene discussed is HLA-B; the disease is esophageal squamous cell carcinoma.