This study aimed to identify hub genes and elucidate the molecular mechanisms underlying low bone mineral density (BMD) in perimenopausal women. R software was used to normalize the dataset and screen the gene set associated with BMD in perimenopausal women from the Gene Expression Omnibus database. Cytoscape software was used to identify 7 critical genes. Gene enrichment analysis and protein interaction was employed to further analyze the core genes, and the CIBERSORT deconvolution algorithm was used to perform immune infiltration analysis of 22 immune genes in the samples. Furthermore, an analysis of the immune correlations of 7 crucial genes was conducted. Subsequently, a receiver operating characteristic curve was constructed to assess the diagnostic efficacy of these essential genes. A total of 171 differentially expressed genes were identified that were primarily implicated in the signaling pathways associated with apoptosis. Seven crucial genes (CAMP, MMP8, HMOX1, CTNNB1, ELANE, AKT1, and CEACAM8) were effectively filtered. The predominant functions of these genes were enriched in specific granules. The pivotal genes displayed robust associations with activated dendritic cells. The developed risk model showed a remarkable level of precision, as evidenced by an area under the curve of 0.8407 and C-index of 0.854. The present study successfully identified 7 crucial genes that are significantly associated with low BMD in perimenopausal women. Consequently, this research offers a solid theoretical foundation for clinical risk prediction, drug sensitivity analysis, and the development of targeted drugs specifically tailored for addressing low BMD in perimenopausal women.