Background: Sepsis is one of the dominating causes of mortality and morbidity in-hospital especially in intensive care units (ICU) patients. The purpose of this study was to develop an eXtreme Gradient Boosting (XGBoost) based model and explore whether it performs better in predicting sepsis from the time of admission in intensive care units (ICU) than other machine learning (ML) methods. Methods: The source data used for model establishment in this study were from a retrospective medical information mart for intensive care (MIMIC) III dataset. Model performance of the XGBoost model was compared to logistic regression (LR), recursive neural network (RNN), and support vector machine (SVM). Then, the performances of the models were evaluated and compared by the area under the curve (AUC) of the receiver operating characteristic (ROC) curves. Results: A total of 6430 MIMIC-III cases are included in this article, in which, 3021 cases have encountered sepsis while 3409 cases have not, respectively. As for the AUC (0.808 (95% CI): 0.767-0.848,DT), 0.802 (95%CI: 0.762-0.842,RNN), 0.790 (95%CI: 0.751-0.830,SVM), 0.775 (95%CI: 0.736-0.813,LR) , results of the models, XGBoost performs best in predicting sepsis. Conclusions: Amongst other ML methods, the XGBoost model demonstrated the best ability in detecting the sepsis.