Introduction. Helicobacter pylori (H. pylori) induces gastritis by stimulating Th17 cells and related cytokines. The aim of our study was to investigate the synergistic effect of metformin with amoxicillin as an antibiotic in inhibiting H. pylori and modulating the immune response in a rat model. Methods. Forty-five male Sprague-Dawley rats were divided into seven groups and infected with H. pylori. Over the course of 14 days, all animals were treated with metformin and amoxicillin alone and in combination. The antibacterial activity of metformin was evaluated by growth curves and colony counts. The immunoregulatory effect on Treg/Th17 balance was assessed by flow cytometry, and the cytokine profile of IL-17A, IL-1β, IL-6, IL-8, TGF-β, and IL-10 was determined by ELISA. The effect of metformin on gene expression of cagA and IL-8 was investigated by RT-PCR. Pathological changes were assessed by hematoxylin and eosin (H&E) staining and immunohistochemical (IHC) staining. Results. Metformin showed weak antibacterial activity against clinically isolated H. pylori. However, the combination of metformin and amoxicillin (AMX) showed strong synergistic antibacterial activity (
Σ
FIC
=
0.24
). Compared with AMX, metformin reduced inflammation and tissue damage but resulted in increased bacterial growth. During metformin administration, both TGF-β levels and Treg cells increased dramatically (
P
=
0.002
). In synergy with AMX, metformin decreased the effective dose of antibiotic to eradicate H. pylori. Conclusions. The combination of metformin with potential antibiotics such as AMX had a positive effect on the relief of H. pylori-related inflammation by inducing Treg cells while successfully eliminating H. pylori.