Traditional approaches for treating wound infections often involve the use of chitosan or hyaluronic acid as carriers for antibacterial agents. In contrast, an innovative method is devised for wound infection management that synergizes photodynamic therapy (PDT) with novel functional matrix materials. This new strategy offers multiple benefits, such as reduced secondary damage to the wound area, a multifaceted antibacterial mechanism, and enhanced moisturization and biocompatibility. The method employs a novel organic semiconductor nanoparticle (OSN) capable of mediating PDT, which is integrated with silk fibroin (SF), perfluorosulfonic acid (PFSA), and agar. Silk fibroin is demonstrated to effectively induce macrophage aggregation, while PDT can further activate these immune cells. The inclusion of PFSA bestows the hydrogel with moisturizing and porous characteristics. Both in vivo and in vitro antibacterial assays confirm the efficacy of PDT in eliminating bacteria, and mouse wound infection model studies show that the hydrogels significantly enhance wound healing and hair follicle regeneration. This novel hydrogel dressing holds promise as an advanced wound care solution, with substantial potential for promoting hair follicle regeneration and providing effective sterilization.