Skin is the initial defense against infection of the body but becomes vulnerable when damaged. Subsequent bacterial infections can cause more severe ulcers. Antibiotics are useful for infected wound healing but can also speed up the evolution of antibiotic-resistant bacteria. Dressing and antibacterial photodynamic therapy (PDT) are effective methods for protecting and treating wounds, respectively. Herein, we developed a spray hydrogel based on sodium alginate hydrogels, loaded with methylene blue (MB) and closo-dodecaborate cluster (closo-B 12 H 12 2− ), for physical protection and antibacterial PDT. Among them, MB acted as the photosensitizer, which can produce reactive oxygen species (ROS) through the PDT process to implement the therapeutic effect toward bacterial-infected wounds. closo-B 12 H 12 2− and MB can form a supramolecular photosensitizer (MB-B 12 ), which can reduce the dark toxicity of the MB photosensitizer without significantly affecting its PDT effect. Moreover, the introduction of closo-B 12 H 12 2− can upgrade the physical property of the spray hydrogel for better wound protection and can also increase the MB loading capacity for better wound healing. The hydrogel demonstrated an outstanding antibacterial ability of around 99% against Staphylococcus aureus and 95% for Escherichia coli. This PDT-spray hydrogel system can be a favorable option for protecting and treating bacterial-infected wounds.