In this study we aimed to identify the predictors of drug survival for biologic and targeted synthetic DMARDs (bDMARDs and tsDMARDs) among patients with rheumatoid arthritis (RA) in a real-world setting. Data from RA patients receiving bDMARDs and tsDMARDs between 2007 and 2019 were extracted from the Taiwan Rheumatology Association Clinical Electronic Registry (TRACER). Patients were categorized into tumor necrosis factor-alpha (TNF-α) inhibitors, non-TNF-α inhibitors, and tofacitinib groups. The primary outcome was 3-year drug retention and the causes of bDMARDs and tsDMARDs discontinuation were recorded. Baseline demographic data before the initiation of bDMARDs and tsDMARDs treatment were analyzed to identify the predictors of 3-year drug survival. A total of 1,270 RA patients were recruited (TNF-α inhibitors: 584; non-TNF-α inhibitors: 535; tofacitinib: 151). The independent protective factors for 3-year drug survival were positive rheumatoid factor (RF) (HR: 0.48, 95% CI: 0.27-0.85, p = 0.013) and biologics-naïve RA (HR: 0.61, 95% CI: 0.39-0.94, p = 0.024). In contrast, positive anti-citrullinated protein antibody (ACPA) (HR: 2.24, 95% CI: 1.32-3.79, p = 0.003) and pre-existing latent tuberculosis (HR: 2.90, 95% CI: 2.06-4.09, p<0.001) were associated with drug discontinuation. RA patients treated with TNF-α inhibitors exhibited better drug retention, especially in the biologics-naïve subgroup (p = 0.037). TNF-α inhibitors were associated with lower cumulative incidence of discontinuation due to inefficacy and adverse events (both p<0.001). Baseline RF and ACPA positivity in abatacept-treated patients were associated with a better 3-year drug survival. However, negative ACPA levels predicted superior drug survival of TNF-α inhibitors and tofacitinib. In conclusion, bio-naïve status predicted better drug survival in TNF-α inhibitors-treated RA patients. RF and ACPA positivity predicted better abatacept drug survival. In contrast, ACPA negativity was associated with superior TNF-α inhibitors and tofacitinib survival.