Balancing short-term antibacterial and long-term anti-inflammation is a great challenge during wound healing. To resolve this problem, a double-layer (DL) hydrogel was designed to achieve the sequential release of drugs. The lower layer was hyaluronic acid (HA) loaded with mupirocin (MUP), and the upper layer was gelatin-N-[tris(hydroxymethyl)methyl] acrylamide hybrid (GTH) hydrogel loaded with ibuprofen (IBU) and MXene nanosheets. The lower layer was applied to the wound site and HA gradually degraded to achieve efficient antibacterial. Simultaneously, MXene was used as a photothermal agent and dispersed in the upper hydrogel, allowing the upper layer to effectively achieve controlled drug release and implement anti-inflammation through the photothermal effect. The in vivo experiment results showed that the prepared DL hydrogel had excellent antibacterial and anti-inflammatory effects, and could effectively promote the repair and regeneration of bacteria contaminated wound tissue. It has been shown that the DL hydrogel has great application prospects in the field of wound treatment.