We engineered a synthetic hydrogel that both induces bone regeneration and eliminates infection through the co-delivery of BMP-2 and lysostaphin, respectively. Here, BMP2 is linked to infection.