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. The gene discussed is CLEC5A; the disease is Sepsis.