Background We aimed to identify risk factors for early complications in systemic lupus erythematosus (SLE) patients undergoing major surgery. Methods We conducted a retrospective comparative cohort study including patients with SLE undergoing major surgery, and non-SLE patients matched 1:1. Main outcomes were development of infectious and noninfectious complications, and 30-day postoperative mortality. Results A total of 382 patients (191 SLE and 191 non-SLE) were included. Postoperative complications occurred in 82 (43%) SLE patients and 58 (30%) without SLE, ( p = 0.01). Variables associated with infectious complications in SLE patients: prednisone use (OR 1.81, 95% CI 1.13-2.90), anemia (OR 2.43, 95% CI 1.45-4.08), hypoalbuminemia (OR 2.58, 95% CI 1.55-4.30) and lymphopenia (OR 2.43, 95% CI 1.52-3.89), p < 0.05. Variables associated with noninfectious complications: anemia (OR, 1.93, 95% CI 1.03-3.64) and hypoalbuminemia (OR 2.11, 95% CI 1.16-3.86), p < 0.05. Variables associated with any complication: SLEDAI-2K (OR 1.1, 95% CI 1.01-1.20), nephritis (OR 10.08, 95% CI 1.21-83.63), aspirin use (OR 2.68, 95% CI 1.19-6.02, p = 0.01), low C3 (OR 2.00, 95% CI 1.06-3.80), anemia (OR 2.68, 95% CI 1.39-5.18), hypoalbuminemia (OR 3.49, 95% CI 1.83-6.66) and lymphopenia (OR 2.36, 95% CI 1.30-4.26), p < 0.05. More patients with SLE died (6% vs 1%, p = 0.02). Conclusions SLE patients present higher frequency of postoperative complications and mortality compared with non-SLE patients. Hypoalbuminemia, anemia, lymphopenia and aspirin use are independent risk factors.