Nonunion and delayed union of the bone are situations in orthopedic surgery that can occur even if the bone alignment is correct and there is sufficient mechanical stability. Surgeons usually apply artificial bone grafts in bone fracture gaps or in bone defect sites for osteogenesis to improve bone healing; however, these bone graft materials have no osteoinductive or osteogenic properties, and fit the morphology of the fracture gap with difficulty. In this study, we developed an injectable chitosan-based hydrogel with MgSO4 and dextran oxidative, with the purpose to improve bone healing through introducing an engineered chitosan-based hydrogel. The developed hydrogel can gelate and fit with any morphology or shape, has good biocompatibility, can enhance the cell-migration capacity, and can improve extracellular calcium deposition. Moreover, the amount of new bone formed by injecting the hydrogel in the bone tunnel was assessed by an in vivo test. We believe this injectable chitosan-based hydrogel has great potential for application in the orthopedic field to improve fracture gap healing.