Overall, this study summarized the immuno-correlations of GBP2 in gastric cancer and pan-cancer, and GBP2 could be a novel biomarker for the predication of immunotherapeutic efficacy in most cancers. Here, GBP2 is linked to gastric cancer.