Aminoglycosides are essential antibiotics used to treat severe infections caused mainly by Gram-negative bacteria. Gentamicin is an aminoglycoside and, despite its toxicity, is clinically used to treat several pulmonary and urinary infections. The commercial form of gentamicin is a mixture of five compounds with minor differences in the methylation of one of their aminosugars. In the case of two compounds, gentamicin C2 and C2a, the only difference is the stereochemistry of the methyl group attached to C-6'. GenB2 is the enzyme responsible for this epimerization and is one of the four PLP-dependent enzymes encoded by the gentamicin biosynthetic gene cluster. Herein, we have determined the structure of GenB2 in its holo form in complex with PMP and also in the ternary complex with gentamicin X2 and G418, two substrate analogues. Based on the structural analysis, we were able to identify the structural basis for the catalytic mechanism of this enzyme, which was also studied by site-directed mutagenesis. Unprecedently, GenB2 is a PLP-dependent enzyme from fold I, which is able to catalyze an epimerization but with a mechanism distinct from that of fold III PLP-dependent epimerases using a cysteine residue near the N-terminus. The substitution of this cysteine residue for serine or alanine completely abolished the epimerase function of the enzyme, confirming its involvement. This study not only contributes to the understanding of the enzymology of gentamicin biosynthesis but also provides valuable details for exploring the enzymatic production of new aminoglycoside derivatives.