Objective: To evaluate the efficacy and safety of a quadruple therapy consisting of magaldrate granules combined with rabeprazole, amoxicillin, and clarithromycin for Helicobacter pylori (Hp). Methods: The patients diagnosed with chronic gastritis and Hp positive via gastroscopy for the first time were prospectively collected from 11 centers in China from June 2021 to May 2024. The patients were divided into three groups according to random number table method: Group A (magaldrate granules quadruple therapy for 14 days), Group B (magaldrate granules quadruple therapy for 10 days and magaldrate granules for 18 days), and Control Group (bismuth quadruple therapy for 14 days). The patients were followed up 3 days after treatment, and 4 weeks after the end of treatment. The analysis data set was used for effectiveness analysis [the eradication rate of Hp was analyzed using the full analysis dataset (FAS) and the per-protocol dataset (PPS)], and non-inferiority evaluation was conductedusing (comparing the rate difference and 95%CI of the eradication rate of Hp. If the lower limit was greater than the preset -10%, the non-inferiority test standard was met). The occurrence of symptoms and adverse reactions were analyzed in each group. Results: A total of 557 patients were enrolled, with 227 males and 330 females, aged (46±12) years (18-65 years). The Hp eradication rates according to FAS were 84.6% (159/188) in Group A, 83.2% (153/184) in Group B, and 85.4% (158/185) in Control Group, respectively. A total of 527 cases were included in PPS analysis, and the Hp eradication rates were 88.8% (158/178), 88.8% (150/169),and 87.2% (157/180) in the three groups, respectively. In the FAS and PPS analyses, there was no significant difference in the Hp eradication rates between Group A and Control Group, or Group B and Control Group (all P>0.05). The rate differences and 95%CI were -0.83% (-8.08%-6.42%) and 1.54% (-5.19%-8.27%) between Group A and Control Group. The rate differences and 95%CI were -2.25% (-9.68%-5.17%) and 1.54% (-5.28%-8.35%) between Group B and Control Group. The lower limits of all confidence intervals exceeded the pre-specified non-inferiority margin of -10%, meeting the criteria for non-inferiority. All three groups of patients exhibited symptoms such as epigastric distension, belching, epigastric pain, and poor appetite. After 3 days of treatment, the relief rate from epigastric pain in Group A [85.9% (55/64)] and Group B [91.2% (52/57)] was higher than Control Group [70.2% (40/57)] (both P<0.05). Adverse reactions of varying severity, including dizziness, nausea, vomiting, abdominal pain, diarrhea, and rash, were reported in all three patient groups. No statistically significant differences were found in the incidence rates of these adverse events between Group A and Control Group, or Group B and Control Group (all P>0.05). Conclusion: The quadruple therapy combining magaldrate granules with rabeprazole, amoxicillin, and clarithromycin demonstrates good Hp eradication efficacy and high safety.