In this paper, methacrylated γ-PGA (mPGA) precursor was synthesized via reaction between γ-PGA and glycidyl methacrylate (GMA). Hydrogels from this precursor were prepared under 365 nm ultraviolet irradiation. The swelling behavior and mechanical properties were studied in detail as functions of the degree of substitution (DS), precursor concentration, and environmental pH. Results showed that the crosslink density, swelling kinetics and mechanical properties of the hdyrogel could be tailored by adjusting the DS and concentration of the precursor as well as the environmental pH. Three-dimensional photo-encapsulation of swine cartilage chondrocytes and Live/Dead assay proved the cytocompatibility of the hydrogel.