Cattle are a primary reservoir of enterohemorrhagic Escherichia coli (EHEC), and contaminated beef products are a source of human infections. The U.S. Department of Agriculture Food Safety and Inspection Service declared seven EHEC serogroups (O26, O45, O103, O111, O121, O145, and O157) as adulterants in raw ground beef. Sampling a large number of animals for EHEC surveillance or evaluations of EHEC-focused preharvest interventions requires a convenient and robust sampling method. We evaluated the diagnostic performance of rectoanal mucosal swab (RAMS) for the detection of the top seven EHEC serogroups. Paired fecal grab (FG) and RAMS samples were collected from 176 beef cattle and tested using the NeoSEEK Shiga toxin–producing E. coli (STEC) confirmation method. The prevalence of virulence-associated genes (stx1, stx2, stx2c, eae, and nleB) was higher in RAMS than in FG samples. The results of the two methods had poor agreement, as indicated by kappa statistics, for the detection of the seven serogroups. When FG and RAMS results were combined for comparison, RAMS was more sensitive than FG for the detection of serogroups O103 (82% versus 39%), O157 (75% versus 67%), and O45 (79% versus 73%) with similar sensitivity for the detection of serogroup O145 (67%). Serogroups O111 and O121 were detected from one and two samples, respectively, by FG and were not detected by RAMS. Serogroup O26 was not detected with either method. RAMS appears to be equivalent or superior to FG sampling for detection of the top seven EHEC serogroups in the feces of beef cattle with the NeoSEEK STEC confirmation test.