Objective: To identify preoperative risk factors associated with major complications in patients with xanthogranulomatous pyelonephritis undergoing total nephrectomy. Method: Retrospective analysis of patient's charts with xanthogranulomatous pyelonephritis who underwent nephrectomy. Risk factors included for analysis were gender, body mass index, Charlson comorbidity index, American Society of Anesthesiologists physical status classification, Malek's stage, leukocyte count and creatinine levels. Postoperative complications were stratified in minor and major according to Clavien-Dindo's classification. Univariate and bivariate analysis using Fisher's exact test, Pearson's chi-squared and odds ratio (OR) was performed. Results: 72 patients were analyzed, 83% women, mean age of 50 years, 58.3% positive urine cultures and 66% kidney stones. Major complications were present in 32% of cases, and 15% were admitted to the intensive care unit. Elevated creatinine (OR: 3.8; 95% confidence interval [95%CI]: 1.1-13; p = 0.02) and Malek's stage II to III (OR: 4.5;; p = 0.02) were associated with major complications. Conclusion: The Malek Stage and elevated creatinine increases the risk of major complications in patients undergoing nephrectomy due to xanthogranulomatous pyelonephritis.