Abstract Background Nosocomial infections with heavy disease burden are becoming a major threat to the health care system around the world. Through long-term, systematic, continuous data collection and analysis, Nosocomial infection surveillance (NIS) systems are constructed in each hospital; while these data are only used as real-time surveillance but fail to realize the prediction and early warning function. Study is to screen effective predictors from the routine NIS data, through integrating the multiple risk factors and Machine learning (ML) methods, and eventually realize the trend prediction and risk threshold of Incidence of Nosocomial infection (INI). Methods We selected two representative hospitals in southern and northern China, and collected NIS data from 2014 to 2021. Thirty-nine factors including hospital operation volume, nosocomial infection, antibacterial drug use and outdoor temperature data, etc. Five ML methods were used to fit the INI prediction model respectively, and to evaluate and compare their performance. Results Compared with other models, Random Forest showed the best performance (5-fold AUC = 0.983) in both hospitals, followed by Support Vector Machine. Among all the factors, 12 indicators were significantly different between high-risk and low-risk groups for INI (P