Background: Severe delayed diarrhea and hematological toxicity limit the use of irinotecan. Uridine diphosphate glucuronosyltransferase 1A1 ( UGT1A1) is a critical enzyme in irinotecan metabolism. The study aims to investigate the safety and efficacy of irinotecan under the guidance of the pre-treatment UGT1A1 genotype in the second-line treatment of gastric cancer. Methods: This study involved 110 patients. Irinotecan was injected intravenously every 3 weeks, and the dose of irinotecan was determined by polymorphism of the UGT1A1 gene, which was divided into three groups (125 mg/m2: GG type; 100 mg/m2: GA type; 75 mg/m2: AA type). The primary end point was overall survival (OS), the secondary end points were progression-free survival (PFS) and safety. Results: One hundred and seven patients received irinotecan treatment and three patients with AA type received paclitaxel treatment. Among 107 patients, there were no significant differences in PFS (4.8 m vs 4.9 m vs 4.4 m; p = 0.5249) and OS (9.3 m vs 9.3 m vs NA; p = 0.6821) among patients with GG/GA/AA subtypes after dose adjustment. For the patient with homozygosity mutation, treatment was switched to paclitaxel. There were no significant differences in PFS and OS among patients with different alleles or after dose adjustment ( p > 0.05). There was a significant difference in the risk of delayed diarrhea ( p = 0.000), leukopenia ( p = 0.003) and neutropenia ( p = 0.000) in patients with different UGT1A1*6 genotypes, while no difference in patients with different UGT1A1*28 genotypes. Additionally, grade 3/4 diarrhea, neutropenia, and leukopenia were significantly more common in AA genotype patients compared to GG (2%, 19%, 24%) or GA (23%, 31%, 31%) genotype patients. Conclusion: Individual irinotecan treatment shows encouraging survival and tolerability outcomes in patients with GG/GA subtype. Irinotecan may be not suitable for patients with AA subtype.