An open critical-size bone defect is a major medical problem because of the difficulty in self-healing, leading to an increased risk of bacterial infection owing to wound exposure, resulting in treatment failure. Herein, a composite hydrogel was synthesized by chitosan, gallic acid, and hyaluronic acid, termed “CGH.” Hydroxyapatite was modified with polydopamine (PDA@HAP) and introduced to CGH to obtain a mussel-inspired mineralized hydrogel (CGH/PDA@HAP). The CGH/PDA@HAP hydrogel exhibited excellent mechanical performances, including self-healing and injectable properties. Owing to its three-dimensional porous structure and polydopamine modifications, the cellular affinity of the hydrogel was enhanced. When adding PDA@HAP into CGH, Ca2+and PO43-could release and then promoted differentiation of BMSCs into osteoblasts. Without any osteogenic agent or stem cells, the area of new bone at the site of defect was enhanced and the newly formed bone had a dense trabecular structure after implanting of the CGH/PDA@HAP hydrogel for 4 and 8 weeks. Moreover, the growth ofStaphylococcus aureusandEscherichia coliwas effectively inhibited through the grafting of gallic acid onto chitosan. Above, this study provides a reasonable alternative strategy to manage open bone defects.