Peri-implantitis, a leading cause of implant failure, currently lacks effective therapeutic strategies. Given that bacterial infection and reactive oxygen species overabundance serve as primary pathogenic and triggering factors, respectively, an adhesive hydrogel has been created for in-situ injection. The hydrogel is a gallic acid-grafted chitosan (CS-GA) hydrogel containing tannic acid miniaturized particles (TAMP). This provides antibacterial and antioxidant properties. Therefore, this study aims to evaluate the potential role of this hydrogel in preventing and treating peri-implantitis via several experiments. It undergoes rapid formation within a span of over 20 s via an oxidative crosslinking reaction catalyzed by horseradish peroxidase and hydrogen peroxide, demonstrating robust adhesion, superior cell compatibility, and a sealing effect. Furthermore, the incorporation of TAMP offer photothermal properties to the hydrogel, enabling it to enhance the viability, migration, and antioxidant activity of co-cultured human gingival fibroblasts when subjected 0.5 W/cm2 808 nm near-infrared (NIR) irradiation. At higher irradiation power, the hydrogel exhibits progressive improvements in its antibacterial efficacy against Porphyromonas gingivalis and Fusobacterium nucleatum. It attains rates of 83.11 ± 5.42 % and 83.48 ± 6.855 %, respectively, under 1 W/cm2 NIR irradiation. In summary, the NIR-controlled CS-GA/TAMP hydrogel, exhibiting antibacterial and antioxidant properties, represents a promising approach for the prophylaxis and management of peri-implantitis.