Objectives. We investigated factors associated with discontinuation of anti-tumor necrosis factor (TNF) therapy in patients with ankylosing spondylitis (AS), who were anti-TNF-naïve and were given etanercept (ETN) or adalimumab (ADA). Methods. This is a retrospective nationwide population-based cohort study. We identified 1401 anti-TNF-naïve patients with AS who initiated ETN (n = 441) or ADA (n = 960) and measured the duration of anti-TNF drug use. We recorded demographic and clinical data of all patients, and calculated adjusted hazard ratios (HRs) and 95% confidence intervals (CIs) using Cox proportional hazard regression analyses. Results. Overall, the ADA and ETN groups had similar risk for drug discontinuation (HR: 0.83; 95% CI: 0.63–1.08). In each group, concomitant use of methotrexate (MTX) or a non-steroidal anti-inflammatory drug was associated with a lower risk of discontinuation. Subgroup analysis indicated that concomitant MTX use reduced risk of discontinuation of ADA (HR: 0.54; 95% CI: 0.40–0.74), but not ETN (HR: 1.03; 95% CI: 0.65–1.63). Conclusions. This study of anti-TNF-naïve patients with AS indicated that users of ADA and ETN had similar overall risk of drug discontinuation. However, patients taking ADA with MTX had a lower risk of discontinuation than those taking ADA alone.