Osteoporosis, as a common metabolic disorder characterized by the decrease of bone mass, can cause fractures, thereby threatening the life quality of females, especially postmenopausal women. Thus, it is necessary to reveal the genes involved in osteoporosis and explore biomarkers for osteoporosis. In this study, two groups, smokers and nonsmokers with different bone mineral density (BMD) levels, were collected from the Gene Expression Omnibus (GEO) database GSE13850. Consensus modules of the two groups were identified; the variety of gene modules between smokers and nonsmokers with different BMD levels was observed; and a consensus module, including 390 genes significantly correlated with different BMD levels, was identified. Function analysis revealed the significantly enriched osteoporosis-related pathways, such as the PI3K-Akt signaling pathway. Hub genes analysis revealed the critical role of
CXCL12
and
CHRM2
in modules related to BMD levels. Based on the support vector machine recursive feature elimination (SVM-RFE) analysis, the model containing 10 genes (
TNS4, IRF2, BSG, GZMM, ARRB2, COX15, RALY, TP53, RPS6KA3
, and
SYNPO
) with good performance in identifying people with different BMD levels was constructed. Among them, the roles of
RALY
and
SYNPO
in the osteogenic differentiation of hBMSCs were verified experimentally. Overall, this study provides a strategy to explore the biomarkers for osteoporosis through analysis of consensus modules.