Chitosan hydrogels stand out for being an adhesive matrix, which presents biocompatibility, antibacterial and osteogenic properties, biodegradability, non-toxicity, capable of retaining, releasing, and distributing therapeutic agents (drugs) at the application site. Therefore, new strategies in the field of orthopedics have focused, above all, on limiting the initial preoperative and postoperative microbial adhesion to implant surfaces, modifying these surfaces, protecting them from eventual adhesions or releasing the antimicrobial agent. The production of chitosan-based hydrogels has been achieved through physical and chemical cross-linking routes. In this context, this research aimed to develop an antibacterial hydrogel based on chitosan and vancomycin for application in total knee arthroplasty and to prevent bacterial infections. For that, three crosslinking procedures of chitosan with genipin were investigated to obtain the hydrogels and drug delivery. For this purpose, initially, the raw materials chitosan, genipin and vancomycin were characterized by infrared spectroscopy (FTIR), scanning electron microscopy (SEM), X-ray diffraction (XRD), pHmetry (pH) and microbiological tests. From the chemical crosslinking procedures evaluated, the drug release was investigated, and the hydrogels were characterized by FTIR, pH, viscosity, microbiology, and cytotoxicity. A new H5Q1GV hydrogel was obtained with good antibacterial activity, potentiated by the acidity of its pH 5.7, which showed good drug release in the first 4 hours after implantation, homogeneous, with ideal viscosity and adhesion for application through syringes in prosthesis surgery. knee and with excellent biocompatibility.