BackgroundCuring refractory Helicobacter pylori infection is difficult. In addition, there is currently no research on the gastric microbiota of refractory H. pylori infection.MethodsWe designed a clinical retrospective study involving 32 subjects divided into three groups: 1. nAGHp.a, treatment-naïve patients with H. pylori infection; 2. nAGHp.b, H. pylori-negative patients; and 3. EFHp.a, patients with refractory H. pylori infection. Gastric mucosal samples from the biobank of our research center were collected for 16S rRNA sequencing analysis and bacterial functions were predicted via PICRUSt.ResultsThere were significant differences between the H. pylori- positive group and the H. pylori-negative group in species diversity, gastric microbiota structure, and bacterial function. The beneficial Lactobacillus in the H. pylori-positive group were significantly enriched compared with those in the refractory H. pylori infection group. The bacterial interaction network diagram suggested that the microbiota interactions in the refractory H. pylori infection group decreased. The gastric microbiota of the refractory H. pylori infection group was enriched in the pathways of metabolism and infectious diseases (energy metabolism, bacterial secretion system, glutathione metabolism, protein folding and associated processing, sulphur metabolism, membrane and intracellular structural molecules, lipopolysaccharide biosynthesis, ubiquinone and other terpenoid-quinone biosynthesis, inorganic ion transport and metabolism, and metabolism of cofactors and vitamins) when compared with the H. pylori-positive group without treatment based on PICRUSt analysis.ConclusionSignificant alterations occurred in the gastric microbiota when eradication of H. pylori failed multiple times. A history of eradication of multiple H. pylori infections leads to an imbalance in the gastric mucosal microbiota to a certain extent, which was mainly reflected in the inhibition of the growth of beneficial Lactobacillus in the stomach. Patients with refractory H. pylori infection may be at a higher risk of developing gastric cancer than other H. pylori-positive patients.