Abstract In this work, a novel in situ gel based on N-isopropylacrylamide as monomer and acrylate terminated poly(l-lactic acid)-b-poly(ethylene glycol)-poly(l-lactic acid) (PLEL) as biodegradable crosslinker was studied. The prepared poly(N-isopropylacrylamide) (PNIPAM) copolymer undergoes a temperature-dependent sol–gel transition, for it is a flowing sol at ambient temperature and turns into a non-flowing gel at around physiological body temperature. The sol–gel phase transition was recorded by using the methods of test tube‐inverting and differential scanning calorimetry (DSC), which depended not only on chemical composition of copolymer, but also on molecular weight of poly(ethylene glycol) (PEG) of PLEL. The in vitro release behaviors showed that ofloxacin as model drug could be released sustainedly from the PNIPAM copolymer hydrogel system. Therefore, PNIPAM copolymer hydrogel might be very useful for its application in biomedical fields such as injectable drug delivery system.