Background: The tumor necrosis factor alpha (TNF-alpha) inhibitor etanercept has been proven to be effective in the treatment of ankylosing spondylitis (AS), while genetic polymorphism may affect drug metabolism or drug receptor, resulting in interindividual variability in drug disposition and efficacy. The purpose of this study is to investigate the correlations between CYP2C9*3/ CYP2D6*10/CYP3A5*3 gene polymorphisms and the efficacy of etanercept treatment for patients with AS. Methods: From March 2012 to June 2015, 312 AS patients (174 males and 138 females, mean age: 35.2 +/- 5.83 years) from 18 to 56 years old were enrolled in this study. Polymerase chain reaction-restriction fragment length polymorphism was applied to detect the allele and genotype frequencies of CYP2C9*3, CYP2D6*10, and CYP3A5*3 gene polymorphisms. The joint swelling score, erythrocyte sedimentation rate (ESR), and C-reactive protein (CRP) level of AS patients were compared before and after 24-week etanercept treatment. Assessment in Ankylosing Spondylitis (ASAS) and bath ankylosing spondylitis disease activity index (BASDAI) scores were recorded to assess the efficacy of etanercept treatment. Results: The AS patients with wild-type *1/*1 and heterozygous *1/*3 genotypes of CYP2C9*3 polymorphism accounted for 93.59% and 6.41%, respectively, without *3/*3 genotype. The AS patients with wild-type CC, heterozygous CT, and mutation homozygous TT genotypes of CYP2D6*10 polymorphism accounted for 19.23%, 39.10%, and 41.67%, respectively. The AS patients with wild-type *1/*1, heterozygous *1/*3, and mutation homozygous *3/*3 genotypes of CYP3A5*3 polymorphism accounted for 7.69%, 36.22%, and 56.09%, respectively. After 24-week treatment, AS patients with wild-type *1/*1 genotype of CYP2C9*3, CC genotype of CYP2D6*10, and *3/*3 genotype of CYP3A5*3 polymorphisms had lower joint swelling score, ESR, and CRP level. The joint swelling score, ESR, and CRP levels were significantly lower in the patients with CC genotype of CYP2D6*10 polymorphism than in CT and TT genotype patients, and they were lower in patients with *3/*3 genotype of CYP3A5*3 polymorphism compared to those with *1/*1 and *1/*3 genotypes. Average visual analog scale scores of 4 ASAS20 indexes were decreased after treatment. The patients with CC genotype of CYP2D6*10 polymorphism and *3/*3 genotype of CYP3A5*3 polymorphism exhibited higher scores of >ASAS20, >BASDAI50%, and effective rate. Conclusion: Our results indicate that CC genotype of CYP2D6*10 polymorphism and *3*3 genotype of CYP3A5*3 polymorphism are correlated with the efficacy of etanercept treatment for AS patients.