The dramatic increase of drug-resistant pathogenic bacteria has seriously effect on human health, appealing the needs of developing theranostic platforms with stimuli-responsive materials to realize the accurate bacterial diagnostics and therapeutics. Herein, a tannic acid and carboxymethyl chitosan-based multifunctional ZIF-90@i-PPOPs-phenol red double-layered hydrogel with stimuli-responsiveness and antibacterial activity was fabricated. The inner layer hydrogel (ZIF-90@i-PPOPs-based TFC hydrogels) was fabricated based on ZIF-90@i-PPOPs, integrate tannic acid and carboxymethyl chitosan linked by formylphenylboronic acid (FPBA), which exhibited outstanding injectable, biodegradability and antibacterial activity. The outer layer hydrogel (PR@PAM hydrogels) were constructed from polyacrylamide (PAM) and pH indicator phenol red, owning porous structure and excellent tissue adhesion. Due to the weakly acidic microenvironment within wound, the inner-layer hydrogel was stimulus-responsively decomposed, resulting in the accurate delivery of the positively charged ZIF-90@i-PPOPs to the lesion site to capture and kill bacteria by enhanced Zn2+ and ROS release. Meantime, the outer-layer hydrogel could real-timely monitor the pH changes to evaluate the wound recovery status. These double-layered hydrogels possessed precisely pH monitoring capacity, excellent antibacterial ability and negligible side effect to normal tissue in vivo, implying the high potential of the suggested hydrogels as theranostic platform for antibacterial treatment.