Recent scientific research has verified a link between malignant tumors in the stomach and the gut microbiota. This research employed Mendelian randomization (MR) techniques to explore the association between gut microbiota and benign gastric malignancies. The data were derived from genome wide association studies-aggregated data consisting of 211 gut microbes and benign gastric lesions and analyzed by MR. Five statistical tools, including inverse variance weighting, weighted median, MR-Egger, simple mode, and weighted mode, were employed in the statistical analysis. The utilization of the leave-one-out approach served as an effective means of detecting data outliers. Furthermore, implementing Mendelian Randomization Pleiotropy RESidual Sum and Outlier (MR-PRESSO) and MR-Egger intercepts was employed to mitigate the impact of horizontal pleiotropy. The Cochran Q scores for inverse variance weighting and MR-Egger were utilized to determine the extent of heterogeneity. The findings indicate that the family Porphyromonadaceae (odds ratio [OR] = 2.185, 95% confidence interval [CI]: 1.239–3.855, P = .007), class Bacilli (OR = 1.556, 95%CI: 1.091 − 2.220, P = .015), family Lactobacillaceae (OR = 1.437, 95%CI: 1.049 − 1.969, P = .024), family Oxalobacteraceae (OR = 1.290, 95%CI: 1.035 − 1.608, P = .023) are positively associated with the occurrence of benign gastric tumors. Conversely, the family Pasteurellaceae (OR = 0.752, 95%CI: 0.566 − 0.999, P = .049) and family Peptococcaceae (OR = 0.622, 95%CI: 0.425 − 0.908, P = .014) exhibit a protective effect and significantly decrease the likelihood of benign gastric tumors. The findings of this study suggest that the probability of developing benign gastric tumors is positively associated with the presence of the family Porphyromonadaceae, class Bacilli, family Lactobacillaceae and family Oxalobacteraceae, In contrast, the presence of the family Pasteurellaceae and family Peptococcaceae is negatively associated with this risk. Therefore, regulating gut microbiota may be a potential strategy to reduce the incidence of benign gastric tumors.