Background Patients with chronic critical illness (CCI) experience poor prognoses and incur high medical costs. However, there is currently limited clinical awareness of sepsis-associated CCI, resulting in insufficient vigilance.Therefore, it is necessary to build a machine learning model that can predict whether sepsis patients will developCCI. Methods Clinical data on19,077 sepsis patients from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database were analyzed. Predictive factors were identified using the Student's t-test, Mann-Whitney Utest, or χ 2test. Six machine learning classification models, namely, the logistic regression, support vector machine, decision tree, random forest, extreme gradient enhancement, and artificial neural network, were established. The optimal model was selected on the basis of its performance. Calibration curves wereused to evaluate the accuracy of model classification, while the external validation dataset was used to evaluate the performance of the model. Results Thirty-seven characteristics,such as elevated alanine aminotransferase, rapid heart rate, and high Logistic Organ Dysfunction System scores, were identified as risk factors for developingCCI. The area under the receiver operating characteristic curve (AUROC) values forall models were above 0.73 onthe internal test set. Among them, the extreme gradient enhancement model exhibited superior performance (F1score=0.91, AUROC=0.91, Brierscore=0.052). It alsoexhibited stable prediction performance onthe external validation set (AUROC =0.72). Conclusion A machine learning model was established to predict whether sepsis patients will develop CCI. It can provide useful predictive information for clinical decision-making.