Introduction: Malignant cerebral edema (MCE) is a serious complication and the main cause of poor prognosis in patients with large-hemisphere infarction (LHI). Therefore, the rapid and accurate identification of potential patients with MCE is essential for timely therapy. This study utilized an artificial intelligence-based machine learning approach to establish an interpretable model for predicting MCE in patients with LHI. Methods: This study included 314 patients with LHI not undergoing recanalization therapy. The patients were divided into MCE and non-MCE groups, and the eXtreme Gradient Boosting (XGBoost) model was developed. A confusion matrix was used to measure the prediction performance of the XGBoost model. We also utilized the SHapley Additive exPlanations (SHAP) method to explain the XGBoost model. Decision curve and receiver operating characteristic curve analyses were performed to evaluate the net benefits of the model. Results: MCE was observed in 121 (38.5%) of the 314 patients with LHI. The model showed excellent predictive performance, with an area under the curve of 0.916. The SHAP method revealed the top 10 predictive variables of the MCE such as ASPECTS score, NIHSS score, CS score, APACHE II score, HbA1c, AF, NLR, PLT, GCS, and age based on their importance ranking. Conclusion: An interpretable predictive model can increase transparency and help doctors accurately predict the occurrence of MCE in LHI patients not undergoing recanalization therapy within 48 h of onset, providing patients with better treatment strategies and enabling optimal resource allocation.