IntroductionImmunity is involved in a variety of bone metabolic processes, especially osteoporosis. The aim of this study is to explore new bone immune-related markers by bioinformatics method and evaluate their ability to predict osteoporosis.MethodsThe mRNA expression profiles were obtained from GSE7158 in Gene expression Omnibus (GEO), and immune-related genes were obtained from ImmPort database (https://www.immport.org/shared/). immune genes related to bone mineral density(BMD) were screened out for differential analysis. protein-protein interaction (PPIs) networks were used to analyze the interrelationships between different immune-related genes (DIRGs). Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses of DIRGs function were performed. A least absolute shrinkage and selection operation (LASSO) regression model and multiple Support Vector Machine-Recursive Feature Elimination (mSVM-RFE) model were constructed to identify the candidate genes for osteoporosis prediction The receiver operator characteristic (ROC) curves were used to validate the performances of predictive models and candidate genes in GEO database (GSE7158,GSE13850).Through the RT - qPCR verify the key genes differentially expressed in peripheral blood mononuclear cells Finally, we constructed a nomogram model for predicting osteoporosis based on five immune-related genes. CIBERSORT algorithm was used to calculate the relative proportion of 22 immune cells.ResultsA total of 1158 DEGs and 66 DIRGs were identified between high-BMD and low-BMD women. These DIRGs were mainly enriched in cytokine−mediated signaling pathway, positive regulation of response to external stimulus and the cellular components of genes are mostly localized to external side of plasma membrane. And the KEGG enrichment analysis were mainly involved in Cytokine−cytokine receptor interaction, PI3K−Akt signaling pathway, Neuroactive ligand−receptor interaction,Natural killer cell mediated cytotoxicity. Then five key genes (CCR5, IAPP, IFNA4, IGHV3-73 and PTGER1) were identified and used as features to construct a predictive prognostic model for osteoporosis using the GSE7158 dataset.ConclusionImmunity plays an important role in the development of osteoporosis.CCR5, IAPP, IFNA4, IGHV3-73 and PTGER1were play an important role in the occurrences and diagnosis of OP.