ObjectivesWe aimed to explore the efficacy and safety of tailored therapy guided by genotypic resistance in the first‐line treatment of Helicobacter pylori (H. pylori) infection in treatment‐naive patients.MethodsGastric mucosal specimens were taken during gastroscopy, and main mutations of clarithromycin‐ and levofloxacin‐resistant genes were detected by polymerase chain reaction (PCR). Sensitive antibiotics were selected individually for treating H. pylori infection with tailored bismuth‐containing quadruple therapy (BQT) consisting of esomeprazole 20 mg twice daily, bismuth potassium citrate 220 mg twice daily, amoxicillin 1 g twice daily, and clarithromycin 500 mg twice daily, or levofloxacin 500 mg once daily, or metronidazole 400 mg four times daily. Safety and patient compliance were assessed 1–3 days after eradication. Treatment outcome was evaluated by urea breath test 4–8 weeks after eradication.ResultsOne hundred and thirty‐two treatment‐naive patients with H. pylori infection were included. PCR results suggested resistance rates of 47.7% and 34.9% for clarithromycin and levofloxacin, respectively, and a dual resistance rate of 18.2%. Eradication rates of tailored BQT were 87.1% and 95.8% by intention‐to‐treat (ITT) analysis and per‐protocol (PP) analysis, respectively. There was no statistically significant difference in the efficacy of 7‐day clarithromycin‐containing, 7‐day levofloxacin‐containing, and 14‐day full‐dose metronidazole‐containing BQT (ITT analysis: P = 0.488; PP analysis: P = 0.833). The incidence of adverse events was 19.7%, and patient compliance was 97.7%.ConclusionTailored BQT guided by genotypic resistance can achieve satisfactory efficacy, safety, and patient compliance in the first‐line treatment of H. pylori infection.