BackgroundIdentifying reliable biomarkers could effectively predict esophagus carcinoma (EC) patients with poor prognosis. In this work, we constructed an immune-related gene pairs (IRGP) signature to evaluate the prognosis of EC.ResultsThe IRGP signature was trained by the TCGA cohort and validated by three GEO datasets, respectively. Cox regression model together with LASSO was applied to construct the overall survival (OS) associated IRGP. 21 IRGPs consisting of 38 immune-related genes were included in our signature, according to which patients were stratified into high- and low-risk groups. The results of Kaplan-Meier survival analyses indicated that high-risk EC patients had worse OS than low-risk group in the training set, meta-validation set and all independent validation datasets. After adjustment in multivariate Cox analyses, our signature continued to be an independent prognostic factor of EC and the signature-based nomogram could effectively predict the prognosis of EC sufferers. Besides, Gene Ontology analysis revealed this signature is related to immunity. ‘CIBERSORT’ analysis revealed the infiltration levels of plasma cells and activated CD4 memory T cells in two risk groups were significantly different. Ultimately, we validated the expression levels of six selected genes from IRGP index in KYSE-150 and KYSE-450.ConclusionsThis IRGP signature could be applied to select EC patients with high mortality risk, thereby improving prospects for the treatment of EC.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12864-023-09496-x.