Background. Osteoporosis is characterized by low bone mass, deterioration of bone tissue structure, and susceptibility to fracture. New and more suitable therapeutic targets need to be discovered. Methods. We collected osteoporosis-related datasets (GSE56815, GSE99624, and GSE63446). The methylation markers were obtained by differential analysis. Degree, DMNC, MCC, and MNC plug-ins were used to screen the important methylation markers in PPI network, then enrichment analysis was performed. ROC curve was used to evaluate the diagnostic effect of osteoporosis. In addition, we evaluated the difference in immune cell infiltration between osteoporotic patients and control by ssGSEA. Finally, differential miRNAs in osteoporosis were used to predict the regulators of key methylation markers. Results. A total of 2351 differentially expressed genes and 5246 differentially methylated positions were obtained between osteoporotic patients and controls. We identified 19 methylation markers by PPI network. They were mainly involved in biological functions and signaling pathways such as apoptosis and immune inflammation. HIST1H3G, MAP3K5, NOP2, OXA1L, and ZFPM2 with higher AUC values were considered key methylation markers. There were significant differences in immune cell infiltration between osteoporotic patients and controls, especially dendritic cells and natural killer cells. The correlation between MAP3K5 and immune cells was high, and its differential expression was also validated by other two datasets. In addition, NOP2 was predicted to be regulated by differentially expressed hsa-miR-3130-5p. Conclusion. Our efforts aim to provide new methylation markers as therapeutic targets for osteoporosis to better treat osteoporosis in the future.