In orthopedic practice, accommodating irregular defects caused by trauma or surgery with traditional preformed bone graft substitutes is often challenging. As a result, injectable hydrogels with seed cells have garnered significant interest in bone repair due to their adaptability and minimally invasive properties. However, they cannot simultaneously achieve injectability and mechanical properties, providing a biophysical and biochemical environment for cell support. In this study, a novel injectable hydrogel system (OA hydrogel) loaded with aspirin and bone mesenchymal stem cells (BMSCs) was developed to enhance osteogenesis and immune regulation in small irregular bone defects. OA hydrogels possessed self-healing and shear-thinning properties due to dynamic/covalent hydrazone bonds between aldehyde-modified hyaluronic acid methacrylate (ADH-HAMA) and oxidized hyaluronic acid (OHA). By photopolymerization of the enclosed HAMA, the OADC hydrogel was further reinforced, making it more suitable for cell proliferation. In vitro, composite hydrogels improved the osteogenic differentiation of BMSCs. Additionally, it promoted the M2 polarization of human monocytic leukemia (THP-1) cells. In vivo, the synergistic effect of acetylsalicylic acid (ASA) and BMSCs encapsulated within the OADC hydrogel promoted new bone formation in rat calvaria through increased recruitment and polarization of M2 macrophages. These findings underscore the significant promise of hydrogels for bone tissue engineering applications.