Hydrogels are commonly used as wound dressings to help maintain a moist environment around the wound and isolate contaminants, thus promoting healing. For irregular wounds, the slow healing process and even infection may occur due to the inability of dressings to adhere well to the wound.Prussian blue (PB)is a metal-organic framework(MOF)material with excellent photothermal conversion and superior stability. In this paper, a kind of near-infrared (NIR)light triggered in-situpolymerized antimicrobial hydrogel was prepared. The free radical initiator wasencapsulated in the hollow PB by a phase change material(PCM)to maintain stability. Theraised temperature triggered by NIRinduced the release and decomposition of the initiator. The matrix was formed by the cross-linking of double bonds on modified chitosan. The quaternary amine groups of modified chitosan and the photothermal properties of PB enhanced the antimicrobial properties of the hydrogel. High-quality wound healing was demonstrated in the whole skin defect model. This study provides a new reference for the preparation of in-situpolymerized hydrogel dressings for irregular wounds.