Toxoflavin is a major virulence factor of the rice pathogen Burkholderia glumae. The tox operon of B. glumae contains five putative toxoflavin biosynthetic genes toxABCDE. ToxA is a predicted S-adenosylmethionine-dependent methyltransferase, and toxA knockouts of B. glumae are less virulent in plant infection models. In this study, we show that ToxA performs two consecutive methylations to convert the putative azapteridine intermediate, 1,6-didemethyltoxoflavin, to toxoflavin. In addition, we report a series of crystal structures of ToxA complexes that reveals the molecular basis of the dual methyltransferase activity. The results suggest sequential methylations with initial methylation at N6 of 1,6-didemethyltoxoflavin followed by methylation at N1. The two azapteridine orientations that position N6 or N1 for methylation are coplanar with a 140° rotation between them. The structure of ToxA contains a class I methyltransferase fold having an N-terminal extension that either closes over the active site or is largely disordered. The ordered conformation places Tyr7 at a position of a structurally conserved tyrosine site of unknown function in various methyltransferases. Crystal structures of ToxA-Y7F consistently show a closed active site, whereas structures of ToxA-Y7A consistently show an open active site, suggesting that the hydroxyl group of Tyr7 plays a role in opening and closing the active site during the multistep reaction.