Periprosthetic infection is a devastating postimplantation complication in which a biofilm layer harboring invasive microorganisms forms around orthopedic implants, leading to severe implant failure and patient morbidity. Despite the development of several infection-triggered antibiotic release approaches, most current antibacterial coatings are susceptible to undesired antibiotic leakage or mechanical disintegration during prosthesis installation. Herein, we propose a self-controllable proteinic antibacterial coating capable of both long-lasting adherence onto titanium implant substrates over the implant fixation period and instantaneous bacterial eradication. Importantly, the pH-dependent reversible metal coordination of mussel adhesive protein (MAP) enabled bacterial concentration-dependent antibiotic delivery in response to infection-induced acidification. In addition, the MAP coating exhibited superior self-healable adhesive properties and scratch resistance, which enabled to avert issues associated with mechanical damages, including peeling and cracking, often occurring in conventional implant coating systems. The gentamicin-loaded MAP coating exhibited complete inhibition of bacterial growth in vivo against Staphylococcus aureus penetrations during implantation surgery (immediate infection) and even 4 weeks after implantation (delayed infection). Thus, our antibiotic-loaded MAP hydrogel coating can open new avenues for self-defensive antibiotic prophylaxis to achieve instant and sustainable bacteriocidal activity in orthopedic prostheses.© 2017 Elsevier Inc. All rights reserved.