Immunogenic cell death (ICD) plays an important role in cancer. We aimed to classify patients with gastric cancer based on ICD gene-expression levels and construct a risk model to predict patient prognosis. A total of 33 ICD genes were obtained from a previously published study. Gene expression and clinical data of stomach adenocarcinoma (STAD) patients were downloaded from The Cancer Genome Atlas (TCGA) and the Gene Expression Omnibus (GEO) databases. ConsensusClusterPlus analysis was used to cluster the patients based on ICD-gene expression. Kaplan–Meier curves were used to compare the prognosis of patients in different clusters. Differentially-expressed genes (DEGs) within the two ICD clusters were screened. LASSO and stepwise Cox regression analyses were performed to construct the prognosis-related risk model. Finally, a nomogram was constructed based on the independent factors. There was a difference in ICD gene-expression patterns between tumor and normal samples. Patients in the C1 cluster had a significantly better prognosis compared to those in the C2 cluster. Apolipoprotein D (APOD), collagen, type VIII, alpha 1 (COL8A1), collagen triple helix repeat containing 1 (CTHRC1), fibrillin 1 (FBN1), follistatin-related protein 1 (FSTL1), heat shock protein beta-8 (HSPB8), and secreted frizzled related protein 2 (SFRP2) genes were used to construct the risk model. Additionally, patients in the high-risk group had a significantly worse prognosis than those in the low-risk group. Age, stage, and risk groups were incorporated into the nomogram model. This nomogram showed great predictive value. Clusters of patients with gastric cancer based on ICD gene-expression levels had a predictive prognosis value. The risk score model constructed using APOD, COL8A1, CTHRC1, FBN1, FSTL1, HSPB8, and SFRP2 was an independent factor for poor prognosis in gastric cancer patients.