Background: Prediction of in-hospital death is important for patient management as well as risk-adjusted evaluation of Congenital heart disease (CHD) surgery performance. Using a large database containing CHD surgery records of 12 years, we aim to establish patient-level in-hospital mortality prediction models.Methods: Patients with congenital heart disease who underwent surgery at Shanghai Children’s Medical Center from January 1, 2006, to December 31, 2017 were included in the study. Each procedure was assigned a complexity score based on Aristotle Score with modification. In-hospital mortalities for various surgery procedures were estimated. In-hospital death prediction models including a procedure complexity score and patient-level risk factors were constructed using logistic regression analysis and machine learning methods. The predictive values of the models were tested. Results: Among 24,684 patients underwent CHD operations, there were 595 (2.4%) in-hospital deaths. The results showed that AUC of the prediction model based on logistic regression is 0.864 (95% CI: 0.833-0.895, P Conclusions: Model constructed using machine learning method and logistic regression containing procedure complexity score and pre-operative patient-level factors had high accuracy in in-hospital mortality prediction. Operation score and age have the greatest impact on model prediction performance.