Helicobacter pylori (H. pylori) infection is a widespread global health issue and a primary cause of diseases like gastritis, gastroduodenal ulcers, and gastric cancer. This study examines the prevalence of H. pylori infection in patients undergoing upper endoscopy and assesses the efficacy of bismuth quadruple therapy (BQT) and levofloxacin triple therapy. A retrospective analysis of 507 gastroscopies was conducted, with indications including epigastric pain, heartburn, postprandial fullness, early satiation, and regurgitation. Rapid urease tests were performed, and endoscopic findings documented. Two treatment regimens were used: BQT as the first-line therapy and levofloxacin triple therapy as the second-line. Of the 507 patients, 68.8% were infected with H. pylori. Gastric ulcer patients had significantly higher H. pylori prevalence compared to those with small polyps, Barrett’s esophagus, or normal endoscopy. Among the 310 patients who participated in follow-up interviews, 11.9% did not initiate therapy and 5.1% discontinued due to intolerance. The overall eradication rate was 88.6%, with BQT showing a higher eradication rate (89.4%) compared to levofloxacin triple therapy (83.8%). The study highlights the high prevalence of H. pylori among patients with gastrointestinal symptoms and the effectiveness of BQT as a first-line treatment.