Ulcerative colitis (UC) usually occurs in the superficial mucosa of the colorectum. Here, a double-network hydrogel (PMSP) was constructed from maleimided γ-polyglutamic acid and thiolated γ-polyglutamic acid through crosslinking of thiol-maleimide and self-oxidized thiols. PMSP with a negative charge specifically adhered to the inflamed mucosa with positively charged proteins rather than to the healthy mucosa. PMSP exhibited good mechanical strength with storage modulus (G′) of 17.6 Pa and a linear viscoelastic region (LVR) of 107.2% strain. Moreover, PMSP showed a stronger bio-adhesive force toward the inflamed tissue-mimicking substrate than toward its healthy counterpart. In vivo imaging confirmed that PMSP specifically adhered to the inflamed colonic mucosa of rats with TNBS-induced UC. KPV (Lys-Pro-Val) as a model drug was easily captured by PMSP through electrostatic interactions, thus retaining its bioactivity for a longer time under high temperature conditions. Moreover, the alleviating effect of KPV on rats with TNBS-induced colitis was significantly improved by PMSP after intracolonic administration. The epithelial barrier of the colon also effectively recovered following PMSP-KPV treatment. PMSP-KPV also modulated the gut flora, markedly augmenting the abundance of beneficial microorganisms in gut homeostasis. The mechanism by which PMSP-KPV induces a therapeutic effect may be associated with the inhibition of oxidative stress. Conclusively, the PMSP hydrogel seems to be a promising rectal delivery system for the therapy of UC. Statement of significanceUlcerative colitis (UC) is a chronic and relapsing disease of the gastrointestinal tract. A key therapeutic approach to treat UC is to repair the mucosal barriers. Here, a double-network hydrogel (PMSP) was constructed from maleimided and thiolated γ-polyglutamic acid through crosslinking of thiol-maleimide and self-oxidized thiols. The negatively charged PMSP specifically adhered to the inflamed colon rather than its healthy counterpart and was retained for a longer time. KPV as a model drug was easily captured by PMSP, which provided better stability to KPV when exposed to high temperature of 50 °C. The epithelial mucosal barrier of the colon was effectively recovered by the rectal administration of PMSP-KPV to rats with TNBS-induced UC. Moreover, PMSP-KPV modulated the gut flora of colitic rats, markedly augmenting the abundance of beneficial microorganisms. Conclusively, PMSP seems to be a promising rectal delivery system for UC therapy.