Infected bone defects represent a common clinical condition involving bone tissue, often necessitating surgical intervention and antibiotic therapy. However, conventional treatment methods face obstacles such as antibiotic resistance and susceptibility to postoperative infections. Hydrogels show great potential for application in the field of tissue engineering due to their advantageous biocompatibility, unique mechanical properties, exceptional processability, and degradability. Recent interest has surged in employing hydrogels as a novel therapeutic intervention for infected bone repair. This article aims to comprehensively review the existing literature on the anti-microbial and osteogenic approaches utilized by hydrogels in repairing infected bones, encompassing their fabrication techniques, biocompatibility, antimicrobial efficacy, and biological activities. Additionally, the potential opportunities and obstacles in their practical implementation will be explored. Lastly, the limitations presently encountered and the prospective avenues for further investigation in the realm of hydrogel materials for the management of infected bone defects will be deliberated. This review provides a theoretical foundation and advanced design strategies for the application of hydrogel materials in the treatment of infected bone defects.