Scaffold-based tissue engineering has shown promise in treating and regenerating lost or damaged bone tissues. Despite encouraging results, achieving comprehensive tissue-restoration remains a challenge due to the problems associated with bacterial colonization of surgically implanted scaffolds. Current approaches to treating post-implantation infections are problematic; systemic antibiotic administration is ineffective due to reduced bioavailability of the antibiotic at the implant site, while revision surgeries are expensive and painful. This study investigates the preparation and the three-dimensional printing of a stimuli-responsive hydrogel to fabricate biomaterial scaffolds capable of reacting to microenvironmental triggers. Since bacterial infection reduces the pH at the site of implantation, the hydrogel was designed to respond to a decrease in pH by releasing zinc oxide nanoparticles (nZnO) with antibacterial property. The developed hydrogel was capable of thermal crosslinking at physiological temperatures and displayed thixotropic properties that facilitated deposition. After establishing print conditions, scaffolds were fabricated and monitored for the release of nZnO at acidic and neutral pH conditions intended to simulate the presence and absence of infection respectively. The in vitro release study showed that the scaffolds released a significantly higher amount of nZnO at acidic pH than at neutral pH, thereby demonstrating potential in inhibiting infection during scaffold-based treatments.