Patients with rheumatoid arthritis (RA) are at increased risk for infection after arthroplasty, yet risks of specific biologic medications are unknown. To compare risk for postoperative infection among biologics and to evaluate the risk associated with glucocorticoids. Retrospective cohort study. Medicare and Truven MarketScan administrative data from January 2006 through September 2015. Adults with RA who were having elective inpatient total knee or hip arthroplasty, either primary or revision, and had a recent infusion of or prescription for abatacept, adalimumab, etanercept, infliximab, rituximab, or tocilizumab before surgery. Propensity-adjusted analyses using inverse probability weights evaluated comparative risks for hospitalized infection within 30 days and prosthetic joint infection (PJI) within 1 year after surgery between biologics or with different dosages of glucocorticoids. Secondary analyses evaluated non-urinary tract hospitalized infections and 30-day readmissions. Among 9911 patients treated with biologics, 10923 surgical procedures were identified. Outcomes were similar in patients who received different biologics. Compared with an 8.16% risk for hospitalized infection with abatacept, predicted risk from propensity-weighted models ranged from 6.87% (95% CI, 5.30% to 8.90%) with adalimumab to 8.90% (CI, 5.70% to 13.52%) with rituximab. Compared with a 2.14% 1-year cumulative incidence of PJI with abatacept, predicted incidence ranged from 0.35% (CI, 0.11% to 1.12%) with rituximab to 3.67% (CI, 1.69% to 7.88%) with tocilizumab. Glucocorticoids were associated with a dose-dependent increase in postoperative risk for all outcomes. Propensity-weighted models showed that use of more than 10 mg of glucocorticoids per day (vs. no glucocorticoid use) resulted in a predicted risk for hospitalized infection of 13.25% (CI, 9.72% to 17.81%) (vs. 6.78%) and a predicted 1-year cumulative incidence of PJI of 3.83% (CI, 2.13% to 6.87%) (vs. 2.09%). Residual confounding is possible, and sample sizes for rituximab and tocilizumab were small. Risks for hospitalized infection, PJI, and readmission after arthroplasty were similar across biologics. In contrast, glucocorticoid use, especially with dosages above 10 mg/d, was associated with greater risk for adverse outcomes. Rheumatology Research Foundation, National Institutes of Health, and Bristol-Myers Squibb.