Escherichia coli is an important opportunistic pathogen, causing several infections in dogs. The antimicrobial resistance of E. coli occurring in companion animals becomes an emerging problem. This study aimed to estimate the prevalence of ESBL-producing E. coli in diarrheic dogs, investigate the occurrence and molecular characterization of carbapenem-resistant isolates, and determine their virulence genes. Fecal samples were collected from 150 diarrheic dogs in Tunisia. E. coli isolates were screened for antimicrobial resistance against 21 antibiotics by the disk diffusion method. The characterization of β-lactamase genes, associated resistance genes, and virulence genes was studied using PCR. Among 95 E. coli strains, 25 were ESBL-producing, and most of them were multidrug-resistant. The most prevalent β-lactamase genes were blaCTX-M1 (n = 14), blaTEM (n = 3), and blaCMY (n = 2). The blaIMP carbapenemase gene was found in two carbapenem-resistant isolates, which showed that carbapenemase-producing E. coli spread to companion animals in Tunisia. Different virulence genes associated with extraintestinal pathogenic E. coli were detected. This is the first report of the characterization of carbapenem resistance and virulence genes in dogs in North Africa. Our study showed that diarrheic dogs in Tunisia can be a potential reservoir of ESBL- or carbapenemase-producing E. coli with a possible risk of transmission to humans.