Extended-spectrum beta-lactamase (ESBL)-producing Escherichia coli strains are believed to be widely distributed among humans and animals; however, to date, there are only few studies that support this assumption on a regional or countrywide scale. Therefore, a study was designed to assess the prevalence of ESBL-producing E. coli in dairy cows and beef cattle in the southern part of Bavaria, Germany. The study population included 30 mixed dairy and beef cattle farms and 15 beef cattle farms. Fecal samples, boot swabs, and dust samples were analyzed for ESBL-producing E. coli using selective media. PCR was performed to screen for CTX-M and ampC resistance genes. A total of 598 samples yielded 196 (32.8%) that contained ESBL-producing E. coli, originating from 39 (86.7%) of 45 farms. Samples obtained from mixed farms were significantly more likely to be ESBL-producing E. coli positive than samples from beef cattle farms (fecal samples, P < 0.001; boot swabs, P = 0.014; and dust samples, P = 0.041). A total of 183 isolates (93.4%) of 196 ESBL-producing E. coli-positive strains harbored CTX-M genes, CTX-M group 1 being the most frequently found group. Forty-six additional isolates contained ampC genes, and 5 of the 46 isolates expressed a bla(CMY-2) gene. The study shows that ESBL-producing E. coli strains are commonly found on Bavarian dairy and beef cattle farms. Moreover, to our knowledge, this is the first report of the occurrence of bla(CMY-2) in cattle in Germany.