Objective: To develop, validate, and evaluate ML algorithms for predicting MSFN. Background: MSFN is a devastating complication that causes significant distress to patients and physicians by prolonging recovery time, compromising surgical outcomes, and delaying adjuvant therapy. Methods: We conducted comprehensive review of all consecutive patients who underwent mastectomy and immediate implant-based reconstruction from January 2018 to December 2019. Nine supervised ML algorithms were developed to predict MSFN. Patient data were partitioned into training (80%) and testing (20%) sets. Results: We identified 694 mastectomies with immediate implant-based reconstruction in 481 patients. The patients had a mean age of 50 ± 11.5 years, years, a mean body mass index of 26.7 ± 4.8 kg/m 2 , and a median follow-up time of 16.1 (range, 11.9-23.2) months. MSFN developed in 6% (n = 40) of patients. The random forest model demonstrated the best discriminatory performance (area under curve, 0.70), achieved a mean accuracy of 89% (95% confidence interval, 83-94), and identified 10 predictors of MSFN. Decision curve analysis demonstrated that ML models have a superior net benefit regardless of the probability threshold. Higher body mass index, older age, hypertension, subpectoral device placement, nipple-sparing mastectomy, axillary nodal dissection, and no acellular dermal matrix use were all independently associated with a higher risk of MSFN. Conclusions: ML algorithms trained on readily available perioperative clinical data can accurately predict the occurrence of MSFN and aid in individualized patient counseling, preoperative optimization, and surgical planning to reduce the risk of this devastating complication.