Objective To prepare pH-sensitive hydrogel loaded metformin hydrochloride and investigate its pH sensitivity and release behavior. Methods The formulation and process of pH-sensitive hydrogel loaded metformin hydrochloride were optimized with the simple factor investigation and the orthogonal experimental design. The morphology was characterized by SEM. The entrapment efficiency and drug-loaded amount were determined by UV. Meanwhile, the dissolution rate of the prepared hydrogel was determined, and pH-sensitive behaviour in different pH medium was investigated.Results The optimized prescription was as follows:chitosan and sodium alginate with a total concentration of 2%(w/v),chitosan:sodium alginate=1:1(g/g),drug:sodium alginate=2:5,3.5% CaCl2(w/v). In vitro release rate showed that the release was less than 4% in artificial gastric juice within 6h,and 99.3% in artificial intestinal juice within 6h.Conclusion The prescription and the preparation process are stable and reliable.The hydrogel had obvious pH sensitivity.