Hydrogels, as a class of materials for tissue engineering and drug delivery, have high water content and solid-like mechanical properties. Currently, hydrogels with an antibacterial function are a research hotspot in biomedical field. Many advanced antibacterial hydrogels have been developed, each possessing unique qualities, namely high water swellability, high oxygen permeability, improved biocompatibility, ease of loading and releasing drugs and structural diversity. In this article, an overview is provided on the preparation and applications of various antibacterial hydrogels. Furthermore, the prospects in biomedical researches and clinical applications are predicted.