In this study, extended-spectrum β-lactamase (ESBL) Escherichia coli were isolated from five dairy farms in three areas of northern Xinjiang, China. Molecular biological techniques were used to systematically analyze drug resistance phenotypes and genotypes, virulence genes, phylogenetics, biofilm formation (BF), and pulsed field gel electrophoresis (PFGE) typing of isolated ESBL E. coli strains. A total of 766 samples were collected from five dairy farms in Shihezi, Urumqi and Yili, from which 149 (19.5 %, 95 % CI: 16.65 %–22.25 %) ESBL E. coli strains were isolated. Their distribution and contamination levels varied from region to region, with 16.2 % (68/419) in Urumqi, 22.4 % (60/268) in Shihezi, and 26.6 % (21/79) in Yili. The majority of isolates (97.3 %, 145/149) harbored the β-lactamase blaCTX-M gene; while blaCTX-M-1 was the dominant phylogenetic group. The analysis of 21 resistance genes and the susceptibility to 13 different antibiotics showed that 91.3 % (136/149) of strains were resistant to three or more antibiotics. Thirty-six strains (24.2 %) belonged to extraintestinal pathogenic E. coli (ExPEC), and phylogenetic typing results were mainly grouped A (50.3 %) and B1 (37.6 %). Also, the biofilm assay revealed that 112 strains (75.2 %) could form biofilms. PFGE results showed that the 49 isolates revealed 21 major pulsotypes (P1–P21) and 28 subtypes with 80 % similarity, indicating the overall genetic diversity in the distribution area and sources of the samples.