Antibiotic resistance genes of Escherichia coli (E. coli) from companion animals were still poorly understood. Here, we investigated the extended-spectrum β-lactamases (ESBLs) resistance genes of E. coli from companion animals in Shandong, China. A total of 79 isolates (80.6%) were recovered from 98 healthy or diarrheal companion animals in 2021, among which ESBLs-producing isolates accounted for 43.0% (34/79), and more than half of ESBL E. coli (ESBL-EC) strains (n = 19) were isolated from healthy companion animals. Diarrheagenic E. coli isolates (45.6%, n = 36) were represented by enterotoxigenic (ETEC) (32.9%), enteropathogenic (EPEC) (10.1%) and enteroinvasive (EIEC) (2.6%), 20 isolates of which were from healthy pets. Among tested antibiotics, resistance to tetracycline (64.6%) was the most commonly observed, followed by doxycycline (59.5%) and ampicillin (53.2%). Notably, all isolates were susceptible to meropenem. The multidrug-resistant (MDR) rate was 49.4%, 20 isolates of which were ESBLs producers; moreover, 23.4%, 16.4% of ESBL-EC strains were resistant to 5 or more, 7 or more antibiotics, respectively. Among the 5 β-lactamase resistance genes, the most frequent gene was blaCTX-M (60.76%), followed by blaSHV (40.51%). The plasmid-mediated quinolone resistance (PMQR) gene aac(6’)-Ib-cr was detected in 35 isolates. Additionally, ESBL-associated genes (i.e., blaCTX-M, blaSHV) were found in 76.5% ESBL-EC strains, with six isolates carrying blaCTX-M and blaSHV. The marker gene of high-pathogenicity island gene irp2 (encoding iron capture systems) was the most frequency virulence gene. Our results showed that ESBL-EC were widespread in healthy or diarrhea companion animals, especially healthy pets, which may be a potential reservoir of antibiotic resistance, therefore, enhancing a risk to public and animal health.