OBJECTIVE: To determine the risk factors for mechanical complications (MC) following corrective surgery for degenerative scoliosis through a machine learning (ML) algorithm. METHODS: Patients with degenerative scoliosis who received corrective surgery were enrolled. A total of 213 cases were ultimately included and randomized into the training set (70%) and test set (30%) to develop the machine learning-based algorithm. The demographic data, comorbidities, regional and global radiographic parameters, paraspinal muscle (PSM) fat infiltration rate (FI%), and vertebral bone quality (VBQ) score were analyzed. RESULTS: A total of 101 patients (47.4%) had MC, including 46 patients with proximal junctional kyphosis or failure (PJK/PJF), 7 patients with distal junctional kyphosis or failure (DJK/DJF), and 25 patients with rod or screw breakage. In the testing set, Gaussian Naive Bayes (GNB) exhibited the highest AUC at 0.77, while Random Forest (RF) exhibited the highest PRC at 0.63. GNB, RF, and Logistic Regression (LR) models all achieved an accuracy of 0.69, while RF exhibited the highest sensitivity at 0.60 and lowest Brier score of 0.20. Shapley Additive Explanation (SHAP) analysis identified higher FI% of PSM, elevated VBQ score, higher preoperative T1-pelvic angle (T1PA), and postoperative lordosis maldistribution as major risk factors for MC. Based on RF model, local interpretable model-agnostic explanations (LIME) visualization was successfully developed for individual risk calculation. CONCLUSION: The RF and GNB models showed the best overall performance. Both RF and GNB models identified top-ranked/major risk factors including higher paraspinal muscle fat infiltration, elevated VBQ score, higher preoperative T1PA angle, and postoperative lordosis maldistribution providing valuable insights for surgical decision-making.