The invention relates to a temperature-sensitive hydrogel containing exendin-4, comprising exendin-4 as an effective ingredient and an amphiphilic copolymer as a medicine slow release carrier, wherein, the amphiphilic copolymer comprises polyester and polyethylene glycol, preferred PLGA-PEG-PLGA. The temperature-sensitive hydrogel is a liquid at room temperature, and is a solid water insoluble gel at the temperature of 37 DEG C, can be used for treating diabetes, and has good drug release property, environmental protection, little irritation, convenient application, and obvious effect. Compared with preparations with a large dose of exendin-4, the hydrogel disclosed herein has the advantages of in vivo formation of gel, easy operation, and continuous release property, and improves bioavailability, reduces administration times, and enhances patient compliance.