Collectively, this study provides an extensive analysis of B cells in the TME of ESCC, highlighting the prognostic significance of the pre-existing profile of HMGB1 and B-cell distribution inside and outside the tumor nest. This evidence concerns the gene HMGB1 and esophageal squamous cell carcinoma.