Polypeptides with short chains of amino acid monomers have been widely applied in the clinic because of their various biological functions. However, the easily-inactivated characteristics and burst releasing of the peptides limit their application in vivo. Here, a novel osteogenic polypeptide hydrogel (GelMA-c-OGP) is created by co-cross-linking template photo-cross-linked gelatin (GelMA) with photo-cross-linkable osteogenic growth peptides (OGP) using ultraviolet radiation. GelMA enables the formation of hydrogel with photo-cross-linkable OGP with good mechanical properties and also promotes bone regeneration. GelMA-c-OGP hydrogel accelerates the bone formation procedure of osteogenic precursor cells by significantly enhancing the expression of osteogenic-related genes BMP-2, OCN, and OPN, and increasing the precipitation of calcium salts in osteoblasts. Similarly, GelMA-c-OGP hydrogel promotes bone regeneration in vivo. Furthermore, it is observed that more collagen fibers connect cortical bones in the GelMA-c-OGP implanted group than the control group by hematoxylin-eosin and immunohistochemical staining of Collagen I and TGF-β. The co-cross-linked OGP polypeptide converts from liquid to solid hydrogel with transient UV light in situ, which also can strengthen the mechanical property of the defect bone and avoid burst osteogenic peptide, releasing during the bone defect healing period. Overall, this hydrogel delivering system has a significant impact on bone defect healing compared with traditional methods.