Hydrogels are appealing biomaterials for applications in regenerative medicine due to their tunable physical and bioactive properties. Meanwhile, therapeutic metal ions, such as magnesium ion (Mg2+), not only regulate the cellular behaviors but also stimulate local bone formation and healing. However, the effective delivery and tailored release of Mg2+ remains a challenge, with few reports on hydrogels being used for Mg2+ delivery. Bisphosphonate exhibits a variety of specific bioactivities and excellent binding affinity to multivalent cations such as Mg2+. Herein, we describe a nanocomposite hydrogel based on hyaluronic acid and self-assembled bisphosphonate-magnesium (BP-Mg) nanoparticles. These nanoparticles bearing acrylate groups on the surface not only function as effective multivalent crosslinkers to strengthen the hydrogel network structure, but also promote the mineralization of hydrogels and mediate sustained release of Mg2+. The released Mg2+ ions facilitate stem cell adhesion and spreading on the hydrogel substrates in the absence of cell adhesion ligands, and promote osteogenesis of the seeded hMSCs in vitro. Furthermore, the acellular porous hydrogels alone can support in situ bone regeneration without using exogenous cells and inductive agents, thereby greatly simplifying the approaches of bone regeneration therapy. STATEMENT OF SIGNIFICANCE In this study, we developed a novel bioactive nanocomposite hydrogel based on hyaluronic acid and self-assembled bisphosphonate-magnesium (BP-Mg) nanoparticles. Such hydrogels are stabilized by the multivalent crosslinking domains formed by the aggregation of Ac-BP-Mg NPs, and therefore show enhanced mechanical properties, improved capacity for mineralization, and controlled release kinetics of Mg2+. Moreover, the released Mg2+ can enhance cell adhesion and spreading, and further promote the osteogenic differentiation of hMSCs. Owing to these unique properties, these acellular hydrogels alone can well facilitate the in vivo bone regeneration at the intended sites. We believe that the strategy reported in this work opens up a new route to develop biopolymer-based nanocomposite hydrogels with enhanced physical and biological functionalities for regenerative medicine.