Background Extracorporeal membrane oxygenation (ECMO) is a critical life-sustaining intervention for patients with severe cardiac or respiratory failure. Predicting outcomes for ECMO patients remains challenging due to the dynamic and complex nature of ECMO therapy. Machine learning (ML) has emerged as a powerful tool for improving prognostication in critical care by integrating large volumes of clinical data to identify complex, nonlinear relationships between variables. Its ability to model complex interactions holds promise for more accurate and personalized risk assessments in ECMO patients. Methods This retrospective study utilized data from the MIMIC-IV v3.1 database, including 162 ECMO-treated patients, to develop machine learning models for predicting 28-day mortality. LASSO regression was first used for feature selection, after which machine learning algorithms, such as logistic regression, Random Forest, XGBoost, decision tree, and support vector machine (SVM), were applied. Model performance was evaluated using area under the curve (AUC), calibration curves, and decision curve analysis (DCA). Results The Random Forest model achieved the highest performance with an AUC of 0.852 (95% CI: 0.745-0.959), outperforming other models. Key predictors identified through LASSO included ACT, age, and MAP, all of which were significantly associated with 28-day mortality. DCA indicated that the Random Forest model provided substantial net clinical benefit, supporting its utility in real-world decision-making. Conclusion Machine learning models, particularly Random Forest, demonstrate substantial potential for improving the prediction of mortality in ECMO patients. By integrating dynamic clinical variables, ML offers a more accurate and individualized approach to risk stratification in this critically ill population. Future research should focus on multi-center validation, the inclusion of genomic data, and the development of time-series models to further enhance predictive performance and clinical applicability.