Kanamycin A is an aminoglycoside antibiotic isolated from Streptomyces kanamyceticus and used against a wide spectrum of bacteria, including Mycobacterium tuberculosis. Biosynthesis of kanamycin involves an oxidative deamination step catalyzed by kanamycin B dioxygenase (KanJ), thereby the C2′ position of kanamycin B is transformed into a keto group upon release of ammonia. Here we present for the first time, structural models of KanJ with several ligands, which along with the results of ITC binding assays and HPLC activity tests explain substrate specificity of the enzyme. The large size of the binding pocket suggests that KanJ can accept a broad range of substrates, which was confirmed by activity tests. Specificity of the enzyme with respect to its substrate is determined by, the hydrogen bond interactions between the methylamino group of the antibiotic and highly conserved Asp134 and Cys150 as well as, between hydroxyl groups of the substrate and Asn120 and Gln80. Upon antibiotic binding, the C-terminus loop is significantly rearranged and Gln80 and Asn120, which are directly involved in substrate recognition, change their conformations. Based on reaction energy profiles obtained by density functional theory (DFT) simulations, we propose a mechanism of ketone formation involving the reactive Fe =O and proceeding either via OH rebound, which yields a hemiaminal intermediate or by abstraction of two hydrogen atoms, which leads to an imine species. At acidic pH, the latter involves a lower barrier than the OH rebound, whereas at basic pH, the barrier leading to an imine vanishes completely.This article is protected by copyright. All rights reserved.