This invention discloses a preparation method for biocompatible rapid-gelatinghydrogel. Wherein,hydrogel is formed by rapid chemical-crosslinking using the mixing andchemical-crosslinkingreaction under specified conditions between several active compoundcomponents. The preparationmethod comprises the following steps: (1) The solution containingbiocompatible thiolatedmacromolecular derivatives (component A) and biocompatible thiol reactivecrosslinking agents(component B) mutually mix to form reactive mixture with specifiedcrosslinking conditions; (2)the reactive mixture forms the hydrogel. The invention also discloses apreparation method fornovel rapid-gelating hydrogel spray and an application in medical field. Thisinvention has theadvantages of good biocompatibility, no by-products, good stability,convenient use, small amountof raw materials used, suitable for many medical application, etc..