Currently, bone tuberculosis (TB) treatment largely involves lifelong drug prescriptions and surgical intervention, resulting in poor quality of life for patients. Therefore, the fabrication of injectable scaffolds to form a solid framework around the defective bone region is gaining importance over the extensive use of antimicrobial inhibitors. Herein, we synthesized a novel bone-adhesive and thermoresponsive hydrogel via conjugation of poly(N-isopropylacrylamide-co-glycidyl methacrylate) (PNIPAM-co-GMA) and cysteine (CYS). Thiolation of the polymer enables chemical cross-linking with the bone glycoprotein, enhancing bone adhesion and permitting control of scaffold retention time. The PNIPAM-co-GMA-CYS hydrogel shows higher cross-linking behavior at 37 °C, forms a strong gel in 260 s, and has 151 kPa adhesion strength on cortical bone. The lead compounds 5-methyl-5H-[1,2,4]triazino[5,6-b]indole-3-thiol (MTIT) and N-tert-butyl-4-methyl-6-(5-methyl-5H-[1,2,4]triazino[5,6-b]indol-3-ylthio)pyrimidin-2-amine (TMTIPA) were identified by a high-throughput screening method. Effective MTIT and TMTIPA are encapsulated in bone-adhesive hydrogel separately, and both have a high release rate above >70% in 180 h. The MTIT- and TMTIPA-loaded PNIPAM-co-GMA-CYS showed an excellent bactericidal effect, reducing the relative intracellular bacterial survival in macrophages. Furthermore, the as-synthesized hydrogel has outstanding mechanical and biocompatibility properties to become a bone-replacing material and provide support to promote bone repair. This work presents a novel bone-adhesive PNIPAM-co-GMA-CYS for the sustained release of lead compounds toward promising alternative bone TB treatment.