A thermogelling graft copolymer is provided. The copolymer is obtainable by (a) polymerizing, in a first step, an activated lignin-based polymer with N-isopropylacrylamide (NIPAAm) to form a lignin/poly(N-isopropylacrylamide) (PNIPAAm) graft copolymer, and (b) polymerizing, in a second step, the lignin/poly(N-isopropylacrylamide) (PNIPAAm) graft copolymer with a monomer mixture comprising (i) poly(ethylene glycol) (meth)acrylate and/or a C1-10 alkyl ether thereof, and (ii) poly(propylene glycol) (meth)acrylate and/or a C1-10 alkyl ether thereof, to obtain a lignin-poly(N-isopropylacrylamide)-block-poly(ethylene glycol)/poly(propylene glycol) graft copolymer. Method of preparing the thermogelling graft copolymer is also provided.