BackgroundSteroid-induced osteonecrosis of femoral head (SONFH) is a severe health risk, and this study aims to identify immune-related biomarkers and pathways associated with the disease through bioinformatics analysis and animal experiments.MethodUsing SONFH-related datasets obtained from the GEO database, we performed differential expression analysis and weighted gene co-expression network analysis (WGCNA) to extract SONFH-related genes. A protein-protein interaction (PPI) network was then constructed, and core sub-network genes were identified. Immune cell infiltration and clustering analysis of SONFH samples were performed to assess differences in immune cell populations. WGCNA analysis was used to identify module genes associated with immune cells, and hub genes were identified using machine learning. Internal and external validation along with animal experiments were conducted to confirm the differential expression of hub genes and infiltration of immune cells in SONFH.ResultsDifferential expression analysis revealed 502 DEGs. WGCNA analysis identified a blue module closely related to SONFH, containing 1928 module genes. Intersection analysis between DEGs and blue module genes resulted in 453 intersecting genes. The PPI network and MCODE module identified 15 key targets enriched in various signaling pathways. Analysis of immune cell infiltration showed statistically significant differences in CD8 + t cells, monocytes, macrophages M2 and neutrophils between SONFH and control samples. Unsupervised clustering classified SONFH samples into two clusters (C1 and C2), which also exhibited significant differences in immune cell infiltration. The hub genes (ICAM1, NR3C1, and IKBKB) were further identified using WGCNA and machine learning analysis. Based on these hub genes, a clinical prediction model was constructed and validated internally and externally. Animal experiments confirmed the upregulation of hub genes in SONFH, with an associated increase in immune cell infiltration.ConclusionThis study identified ICAM1, NR3C1, and IKBKB as potential immune-related biomarkers involved in immune cell infiltration of CD8 + t cells, monocytes, macrophages M2, neutrophils and other immune cells in the pathogenesis of SONFH. These biomarkers act through modulation of the chemokine signaling pathway, Toll-like receptor signaling pathway, and other pathways. These findings provide valuable insights into the disease mechanism of SONFH and may aid in future drug development efforts.