Helicobacter pylori (H. pylori) infection is the most important risk factor for gastric cancer. Eradication of H. pylori significantly reduces the incidence and mortality of gastric cancer. H. pylori resistance to antibiotics and a gradual decline in eradication rates are gaining more and more attention. Our study aimed to address the correlation between endoscopic manifestations and the eradication effect of H. pylori. We retrospectively reviewed outpatients in our hospital with H. pylori infection undergoing eradication therapy from January 2022 to March 2023. Both the primary diagnosis and eradication of H. pylori after treatment were confirmed by a 13C urea breath test. Patients were treated with a proton pump inhibitor (PPI)-based quadruple therapy. Clinical characteristics and endoscopy manifestations within 7 days before or after patients were diagnosed with H. pylori infection were analyzed. From January 2022 to March 2023, a total of 323 patients were enrolled in this study. There were 138 male patients and 185 female patients. The mean age of patients was 45.62 ± 13.04 years. The H. pylori initial eradication rate was 82.0%. Univariate analysis of factors affecting H. pylori eradication showed that sex, age, and endoscopic manifestations including diffuse redness, multiple white, and flat elevated lesions, and atrophy were significantly associated with the failure of H. pylori eradication therapy. A multivariable logistic regression model analysis of these five factors showed that patients aged over 60 years with multiple white and flat elevated lesions in the endoscopic examination are significantly less likely to eradicate H. pylori with empirical quadruple therapy. On the other hand, patients with diffuse redness were significantly more likely to eradicate H. pylori infection with empirical quadruple therapy. Our study shows that age over 60 years old, multiple white and flat elevated lesions in endoscopic examination are independent risk factors of initial H. pylori eradication failure with empirical quadruple therapy, while diffuse redness in endoscopic examination is a protective factor of initial H. pylori eradication failure with empirical quadruple therapy, while diffuse redness in endoscopic examination is a protective factor. For patients with these risk factors, a drug sensitivity test or H. pylori resistance gene mutation detection may be more appropriate. However, further mechanism studies or prospective studies are needed to prove our findings.