Bacterial infection, reactive oxygen species (ROS) accumulation, and persistent inflammation pose significant challenges in the treatment of periodontitis. However, the current single-modal strategy makes achieving the best treatment effect difficult. Herein, we developed a double-network hydrogel composed of Pluronic F127 (PF-127) and hyaluronic acid methacrylate (HAMA) loaded with spermidine-modified mesoporous polydopamine nanoparticles (M@S NPs). The PF-127/HAMA/M@S (PH/M@S) hydrogel was injectable and exhibited thermosensitivity and photocrosslinking capabilities, which enable it to adapt to the irregular shape of periodontal pockets. In vitro, the PH/M@S displayed multiple therapeutic effects, such as photothermal antibacterial activity, a high ROS scavenging capacity, and anti-inflammatory effects, which are beneficial for the multimodal treatment of periodontitis. The underlying anti-inflammatory mechanism of this hydrogel involves suppression of the extracellular regulated protein kinase 1/2 and nuclear factor kappa-B signalling pathways. Furthermore, in lipopolysaccharide-stimulated macrophage conditioned media, the PH/M@S effectively restored the osteogenic differentiation potential. In a rat model of periodontitis, the PH/M@S effectively reduced the bacterial load, relieved local inflammation and inhibited alveolar bone resorption. Collectively, these findings highlight the versatile functions of the PH/M@S, including photothermal antibacterial activity, ROS scavenging, and anti-inflammatory effects, indicating that this hydrogel is a promising multifunctional filling material for the treatment of periodontitis.