Otitis media (OM) is the main reason for pediatric antibiotic prescriptions. The current treatment mandates a rigorous regimen of multidose antibiotics over 5-10 days. The systemic antibiotic exposure and often prematurely terminated treatment due to the challenge of drug administration to young patients are believed to breed antibiotic resistance. To address these challenges, we designed a local treatment that converted a metabolic product (H 2 O 2 ) of an OM pathogen ( Streptococcus pneumoniae ) into a potent antiseptic (HOBr), a reaction catalyzed by locally administered vanadium pentoxide nanowires. The therapeutic, HOBr, was only synthesized in the presence of the pathogen, enabling on-demand generation of therapeutics for OM treatment. Hypohalous acids are broad-spectrum and have a long history in general disinfection applications without breeding substantial drug resistance. A single dose of the nanowire formulation eradicated OM in a standard chinchilla model in 7 days with no observable tissue toxicity or negative impact on hearing sensitivity.