Current clinical approaches to osteoporosis primarily target osteoclast biology, overlooking the synergistic role of bone cells, immune cells, cytokines, and inorganic components in creating an abnormal osteoporotic microenvironment. Here, metal-polyDNA nanoparticles (Ca-polyCpG MDNs) composed of Ca2+ and ultralong single-stranded CpG sequences were developed to reconstruct the osteoporotic microenvironment and suppress osteoporosis. Ca-polyCpG MDNs can neutralize osteoclast-secreted hydrogen ions, provide calcium repletion, promote remineralization, and repair bone defects. Besides, the immune-adjuvant polyCpG in MDNs could induce the secretion of osteoclastogenesis inhibitor interleukin-12 and reduce the expression of osteoclast function effector protein to inhibit osteoclast differentiation, further reducing osteoclast-mediated bone resorption. PPi4- generated during the rolling circle amplification reaction acts as bisphosphonate analog and enhances bone targeting of Ca-polyCpG MDNs. In ovariectomized mouse and rabbit models, Ca-polyCpG MDNs prevented bone resorption and promoted bone repair by restoring the osteoporotic microenvironment, providing valuable insights into osteoporosis therapy.