To enhance osteointegration between bone implants and bone tissues in implantation surgery, this study aimed to develop a hydrogel using chitosan and dextran to improve the cell proliferative ability, cell migratory capacity, and cell osteogenic ability. Herein, we developed two different hydrogel compositions with three different amounts of magnesium sulfate to produce six hydrogels for application as a filler for total knee replacement surgery to replace bone cement. The swelling property, degradation behavior, composition, and structure of the hydrogel were systemically investigated. Moreover, an MTT assay, scratch test, and alizarin red S staining were conducted to analyze the cell viability, migratory ability, and osteogenic response after being stimulated by the hydrogel. MC3T3-E1 preosteoblasts exhibited significantly improved cell proliferation, migratory capacity, osteogenesis, and mineralization due to MgSO4 in the hydrogel. Our work provides insights into the development of biomimetic and osteogenic hydrogels for bone integration in implantation surgery.