An injectable in-situ crosslinked hydrogel and the preparation method thereof. The method comprises the step of: filling the crosslinking active solution of at least one biocompatible macromolecule into an injectable container, wherein the macromolecule has more than two sulfhydryl groups in its side chain forming the in-situ disulfide crosslinked hydrogee with the aid of the action of the dissolved oxygen. By controlling the parameters such as differential pressure of the oxygen, temperature, time etc., it can adjust the concentration of the dissolved oxygen and optimize the gelation process and the property of the gel. The uses of the injectable in-situ crosslinked hydrogel in medicines or surgeries are also disclosed.