Dental caries have plagued humans for many years. At present, photocrosslinking resin is commonly used in clinics to repair narrow tooth defects, but the ultraviolet light used in this process has unavoidable cytotoxicity. In situ hydrogels with a similar structure to that of the natural extracellular matrix have gradually attracted attention in the field of hard tissue repair engineering. The injectable molding properties of hydrogel also give it the potential to fill irregularly shaped or fine tissue defects. Through a rapid and facile Michael addition reaction, we prepared maleic chitosan (CS-maleic anhydride [MA]) and thiolated alginate (sodium alginate [SA]-SH) to form a CS-MA/SA-SH hydrogel. To endue its mineralize ability, β-glycerophosphate calcium phosphate and calcium carbonate as the precursor of hydroxyapatite (HAp) were premixed in the hydrogel at certain ratios. This kind of hydrogel can quickly form into different shapes within 10 min. It is worth noting that external Ca2+ can react with the residual carboxyl groups of SA and provide the hydrogel with a self-healing ability. At the same time, we creatively propose a method that uses alkaline phosphatase to promote the mineralization of HAp in hydrogels, to achieve the purpose of regenerating hard tissue in situ. By examining the properties of hydrogels at different concentrations of calcium and phosphorus salts, we find that the CS-MA/SA-SH hydrogel with 50% (wt.%) inorganic matter presented the best self-healing properties, excellent mineralization of highly crystallized Hap, and has ideal cell compatibility. The potential application of the CS-MA/SA-SH hydrogel in repairing exposed dentin tubules in decayed teeth was explored through preliminary in vitro dental restoration experiments. Obviously, the penetration depth through dentin tubules was better than that of commercial dental sensitizers. In addition, the HAp morphology was affected by the local environment. We believe that this hydrogel can utilize tissues for dental regeneration and mineralization, and the healing ability provides the hydrogel flexibility for further application in hard tissue regeneration. Impact statement In this article, we report a simple, gentle, and rapid method for the synthesis of new, in situ-formable polysaccharide-based hydrogels that are capable of healing through the Michael addition reaction, which does not require any crosslinking agents. The rapid healing ability of the hydrogel can be obtained within 1 min by introducing calcium ions, giving the hydrogel the possibility of self-healing in the cap-enriched state. Second, we conferred in vitro mineralization of hydrogels and used a simple novel "enzyme-promoted" approach. Simulated mineralization using human body-enriched alkaline phosphatase as an inducer, allowing hydrogels rich in calcium glycerophosphate and calcium chloride to be highly similar to natural hydroxyphospholipids in a simulated body fluid environment at 37°C, stone-structured, and well-shaped thin-section mineralized products. Finally, we use the self-healing hydrogel with in vitro mineralization ability to carry out simple repair and mineralization regeneration of enamel and dentin, and this result is related to the tooth desensitizing agent commonly used in Chinese dental clinics. Comparison of commercial hydrogels further proves that this polysaccharide-based hydrogel is not only convenient for clinical operation in oral prosthesis but also has obvious advantages in the sealing of enamel by dental tubules and the enhancement of tooth hardness.