By leveraging bioinformatics analysis and machine learning algorithms, we systematically identified five immune-related candidate hub genes (CLEC5A, KLRB1, LCN2, MCEMP1, and MMP9) and provided a nomogram for diagnosing ROP with sepsis. This evidence concerns the gene MMP9 and Sepsis.