Bacterial infections pose a significant challenge to global public health, and the development of innovative antibacterial materials is becoming increasingly urgent. Currently, hydrogels are widely studied for the treatment of bacterial infection. However, it is still a great challenge to load antibacterial nanoparticles into the hydrogel matrix by using green synthesis method. Tannic acid (TA) is an eco-friendly reducing agent for the synthesis of metal nanoparticles, and it also has antibacterial activity. In this paper, an antibacterial chitosan/sodium alginate (HCS/SA) hydrogel film embedded with AgNPs was fabricated through in-situ green reduction with TA to utilize the synergistic antibacterial effect of TA and silver nanoparticles (AgNPs). The chemical composition and morphology of the antibacterial hydrogel were characterized by using FTIR, XRD, SEM, and EDS. The results demonstrated that TA solution under alkaline conditions could convert AgNO3 to AgNPs, and AgNPs were embedded uniformly on the surface of the HCS/SA hydrogel film. In addition, the pH of the TA solution significantly influenced the swelling behavior of the antibacterial hydrogel films. When the pH of the TA solution increased from 7 to 10, the swelling ratio of the antibacterial hydrogel film increased from 388.89% to 648.69%. In addition, the hemolysis rates of our prepared hydrogel films were below 5%, meeting the safety requirements. In vitro antibacterial experiments revealed that the fabricated hydrogel films showed excellent antibacterial effects against E. coli, S. aureus, and P. aeruginosa with inhibition zones up to 25.8 ± 0.24 mm, 32.2 ± 0.62 mm, and 22.6 ± 0.49 mm, respectively. Therefore, the antibacterial hydrogel films developed in this study hold potential for treating bacteria-infected wounds.