OBJECTIVES: The impact of immunosuppression on postoperative outcomes has primarily been studied in patients undergoing joint replacement surgery. We aimed to evaluate the impact of biologics and glucocorticoids on outcomes after other major surgeries. METHODS: This retrospective cohort study used Medicare data 2006-2015 to identified adults with rheumatoid arthritis undergoing hip fracture repair, abdominopelvic surgery (cholecystectomy, hysterectomy, hernia, appendectomy, colectomy) or cardiac surgery (coronary artery bypass graft, mitral/aortic valve). Logistic regression with propensity-score-based inverse probability weighting compared 90-day mortality and 30-day readmission in patients receiving methotrexate (without a biologic or targeted synthetic disease-modifying antirheumatic drug (tsDMARD)), a tumour necrosis factor inhibitor (TNFi) or a non-TNFi biologic/tsDMARD <8 weeks before surgery. Similar analyses evaluated associations between glucocorticoids and outcomes. RESULTS: We identified 10 777 eligible surgeries: 3585 hip fracture, 5025 abdominopelvic and 2167 cardiac surgeries. Compared with patients receiving methotrexate, there was no increase in the risk of 90-day mortality or 30-day readmission among patients receiving a TNFi (mortality adjusted OR (aOR) 0.83 (0.67 to 1.02), readmission aOR 0.86 (0.75 to 0.993)) or non-TNFi biologic/tsDMARD (mortality aOR 0.78 (0.49 to 1.22), readmission aOR 1.02 (0.78 to 1.33)). Analyses stratified by surgery category were similar. Risk of mortality and readmission was higher with 5-10 mg/day of glucocorticoids (mortality aOR 1.41 (1.08 to 1.82), readmission aOR 1.26 (1.05 to 1.52)) or >10 mg/day (mortality aOR 1.64 (1.02 to 2.64), readmission aOR 1.60 (1.15 to 2.24)) versus no glucocorticoids, although results varied when stratifying by surgery category. CONCLUSIONS: Recent biologic or tsDMARD use was not associated with a greater risk of mortality or readmission after hip fracture, abdominopelvic or cardiac surgery compared with methotrexate. Higher dose glucocorticoids were associated with greater risk.