The invention relates to a preparation method of a hydrogel matrix, especially a preparation method of an alginic acid hydrogel matrix for UV 3D printing, and belongs to the technical field of biological material preparation. According to the preparation method, alkenyl groups are grafted on the molecular chains of sodium alginate prepared by a freeze-dry method, and after dissolving and mixing, the alginic acid hydrogel matrix for UV 3D printing is obtained. The preparation method adopts a freeze-drying technology under mixed solvent environment, the grafting rate of sodium alginate is largely improved, and the problem that the UV curing speed is slow due to low grafting rate is completely solved. The prepared alginic acid hydrogel matrix can rapidly solidify under the irradiation of UV light, the solid state can be maintained, moreover, in the presence of low concentration metal halides, the system can be further solidified, the hydrogel strength is improved, and the problems of conventional 3D printing hydrogel such as difficult moulding, collapse, and the like are overcome. The preparation method is simple, the cost is low, and the preparation method can be applied to industry easily.