AbstractBackground and AimsTo explore the use of different machine learning models in prediction of COVID‐19 mortality in hospitalized patients.Materials and MethodsA total of 44,112 patients from six academic hospitals who were admitted for COVID‐19 between March 2020 and August 2021 were included in this study. Variables were obtained from their electronic medical records. Random forest‐recursive feature elimination was used to select key features. Decision tree, random forest, LightGBM, and XGBoost model were developed. Sensitivity, specificity, accuracy, F‐1 score, and receiver operating characteristic (ROC)‐AUC were used to compare the prediction performance of different models.ResultsRandom forest‐recursive feature elimination selected following features to include in the prediction model: Age, sex, hypertension, malignancy, pneumonia, cardiac problem, cough, dyspnea, and respiratory system disease. XGBoost and LightGBM showed the best performance with an ROC‐AUC of 0.83 [0.822−0.842] and 0.83 [0.816−0.837] and sensitivity of 0.77.ConclusionXGBoost, LightGBM, and random forest have a relatively high predictive performance in prediction of mortality in COVID‐19 patients and can be applied in hospital settings, however, future research are needed to externally confirm the validation of these models.