Background: Anticipating on in-birth Cardiopulmonary Resuscitation(CPR) in neonates is very important and complex. Timely identification and rapid CPR in neonates in the delivery room significantly affect reducing the mortality and other neurological disabilities. The aim of this study is to create a prediction system for identifying the need to in-birth CPR in neonates based on Machine Learning(ML) algorithms.Methods: In this study, 3882 neonatal medical records were retrospectively reviewed. Records were extracted from the maternal, fetal, and neonatal registry of Valiasr hospital in Tehran. A total of 60 risk factors were extracted, and five ML algorithms including J48, Naïve Bayesian, Multilayer Perceptron (MLP)، Support Vector Machine (SVM) and Random Forest were compared to predict the need to in-birth CPR in neonates. Also, using 10 feature selection algorithms, the features were ranked based on the importance, and using the ML algorithms, the important risk factors were identified. Results: In order to predict the need to in-birth CPR in neonates, SVM using all risk factors reached the accuracy of 88.43% and F-measure of 88.4%, while MLP using the 15 first important features reached the accuracy of 90.86% and the F-measure of 90.8%. The most important risk factors included gestational age, delivery type, presentation, steroid administration, macrosomia, prenatal care, infant number and rank, mother addiction, maternal chronic disease history, fetal hydrops, amniotic fluid, gestational hypertension, infertility and placental abruption. Conclusions: The proposed system can be useful in predicting the need to CPR in neonates in the delivery room.