Background: After the failure of clarithromycin-and bismuth-based quadruple therapy (CBQT), levofloxacin-and bismuth-based quadruple therapy (LBQT) is recommended for Helicobacter pylori eradication. We compared the efficacies of second-line tailored bismuth-based quadruple therapy (TBQT) and empirical LBQT. Methods: Patients with CBQT failure were randomly assigned to receive TBQT or LBQT for 14 days. All patients underwent endoscopy for culture-based antibiotic susceptibility testing. Patients in the TBQT group exhibiting levofloxacin susceptibility were randomized to receive amoxicillin, levofloxacin, esomeprazole, and colloidal bismuth pectin (ALEB) or amoxicillin, furazolidone, esomeprazole, and colloidal bismuth pectin (AFEB) for 14 days; patients with levofloxacin resistance received AFEB. Results: From May 2016 to June 2019, 364 subjects were enrolled. Eradication rates were significantly higher in the TBQT group (n = 182) than in the LBQT group (n = 182) according to both intention-to-treat (ITT) analysis (89.6% vs. 64.8%, P < 0.001) and per protocol (PP) analysis (91.1% vs. 67.8%, P < 0.001). Among patients in the TBQT group with levofloxacin susceptibility, eradication rates were similar in the ALEB (n = 51) and AFEB (n = 50) subgroups according to both the ITT (86.3% vs. 90.0%, P = 0.56) and PP (88.0% vs. 90.0%, P = 0.75) analyses. Isolated clarithromycin and levofloxacin resistance rates were 57.7% and 44.5%, respectively. The total clarithromycin and levofloxacin resistance rate in strains with dual or triple resistance was 35.7%. Conclusions: TBQT was more effective than LBQT as a second-line strategy after CBQT failure. In the absence of antibiotic susceptibility testing, AFEB therapy might be used as a rescue therapy to eradicate H. pylori and avoid levofloxacin resistance. Trial registration: Chinese Clinical Trial Registry (www.chict r.org.cn): ChiCTR1900027743.