O-Methylated benzoxazinoids (BXs) and flavonoids are widespread defenses against herbivores and pathogens in the grasses (Poaceae). Recently, two flavonoid O-methyltransferases (FOMTs), ZmFOMT2 and ZmFOMT3, have been reported to produce phytoalexins in maize (Zea mays). ZmFOMT2 and ZmFOMT3 are closely related to the BX O-methyltransferases (OMTs) ZmBX10-12 and ZmBX14, suggesting a common evolutionary origin in the Poaceae. Here, we studied the evolution and enzymatic requirements of flavonoid and BX O-methylation activities in more detail. Using BLAST searches and phylogenetic analyses, we identified enzymes homologous to ZmFOMT2 and ZmFOMT3, ZmBX10-12, and ZmBX14 in several grasses, with the most closely related candidates found almost exclusively in species of the Panicoideae subfamily. Biochemical characterization of candidate enzymes from sorghum (Sorghum bicolor), sugar cane (Saccharum spp.), and teosinte (Zea nicaraguensis) revealed either flavonoid 5-O-methylation activity or DIMBOA-Glc 4-O-methylation activity. However, DIMBOA-Glc 4-OMTs from maize and teosinte also accepted flavonols as substrates and converted them to 3-O-methylated derivatives, suggesting an evolutionary relationship between these two activities. Homology modeling, sequence comparisons, and site-directed mutagenesis led to the identification of active site residues crucial for FOMT and BX OMT activity. However, the full conversion of ZmFOMT2 activity into BX OMT activity by switching these residues was not successful. Only trace O-methylation of BXs was observed, indicating that amino acids outside the active site cavity are also involved in determining the different substrate specificities. Altogether, the results of our study suggest that BX OMTs have evolved from the ubiquitous FOMTs in the PACMAD clade of the grasses through a complex series of amino acid changes.