A hydrogel and a preparation method thereof, the hydrogel including a polysaccharide having, at the side chain, a carboxyl group to which an amphiphilic side chain is bonded, an inorganic ion other than a calcium ion, and water. The hydrogel has high viscoelasticity, is useful as a medical material for various purposes, and examples thereof include hydrogels that can be injected into a body using a tool such as a syringe.