Faced with infectious bone defects, the development of a thermosensitive hydrogel containing icariin (ICA) represents a promising therapeutic strategy targeting infection control and bone regeneration. In this study, we prepared and evaluated the physicochemical properties, in vitro and in vivo drug release, antimicrobial activity, anti-inflammatory properties, and bone repair effects of ICA/Chitosan/β-Glycerophosphate (ICA/CTS/β-GP) thermosensitive hydrogel. Our findings demonstrate that the ICA/CTS/β-GP thermosensitive hydrogel undergoes a liquid-to-gel transition at body temperature, which is crucial for maintaining local drug release at the defect site. Additionally, the hydrogel exhibited sustained release of ICA over 28 days, showing high antimicrobial activity against Staphylococcus aureus and good biocompatibility in blood compatibility tests. In a canine model of infectious bone defects, the ICA/CTS/β-GP thermosensitive hydrogel showed effective infection control and modulated inflammation, vascular formation, and bone factor expression, while also activating the Wnt/β-catenin signaling pathway. In conclusion, the ICA/CTS/β-GP thermosensitive hydrogel could control infection and repair bone tissue. Its antimicrobial and osteogenic properties provide hope for its clinical application.