Background: The aim of this study was to evaluate the relationships of CYP2C9 and COX-2 genetic polymorphisms with therapeutic efficacy of non-steroidal anti-inflammatory drugs (NSAIDs) in treatment of ankylosing spondylitis (AS). Material/Methods: We enrolled 130 AS inpatients and outpatients in the Arthritis and Rheumatism Department of Peking University First Hospital and 106 healthy people getting routine check-ups between September 2013 and July 2014. CYP2C9 and COX-2 genetic polymorphisms were detected by PCR-RFLP. All AS patients underwent medical treatment and 12-week follow-up treatment. Score differences of BASDAI, ASAS20, ASAS50, and ASAS70 for AS patients with different genotypes before and after treatment were compared. Results: In terms of COX-2-1290A/G and -1195G/A gene polymorphism genotype and allele frequency, the case group and control group were obviously different (all P0.05). AS patients had improved BASDAI, ASAS20, ASAS50, and ASAS70 scores after they received NSAID treatment (all P<0.05). Furthermore, the efficacy of NSAID in treatment of AS and COX-2 gene -1290A/G and -1195G/A polymorphism were associated (all P0.05). Conclusions: COX-2-1290A/G and -1195G/A polymorphism may increase AS risk and they both can be considered as biological indicators for prediction of efficacy of NSAIDs in treatment of AS.