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-situ polymerized antimicrobial hydrogel was prepared. The free radical initiator was encapsulated in the hollow PB by a phase change material (PCM) to maintain stability. The raised temperature triggered by NIR induced 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-situ polymerized hydrogel dressings for irregular wounds.