Through Mendelian randomization analysis and single-cell analysis, our results suggest a potential pathogenic mechanism that the expression level of HLA-DRA, which is mainly expressed in monocytes/macrophages and myeloid cells, is inversely correlated with the risk of gastric cancer. This evidence concerns the gene HLA-DRA and gastric cancer.