Contamination of environmental waters by extended-spectrum--lactamase (ESBL)-producing Escherichia coli (ESBLEC) is of great concern. Wastewater treatment plants (WWTPs) and hospitals release large amounts of ESBLEC into the environment. In the present study, we isolated ESBLEC strains from wastewater collected from a WWTP and a hospital in Japan and performed whole-genome sequencing to characterize these strains. Genomic analysis of 54 strains (32 from the WWTP and 22 from hospital wastewater) revealed the occurrence of clinically important clonal groups with extraintestinal pathogenic E. coli status in the WWTP and hospital wastewater. Fine-scale phylogenetic analysis was performed to further characterize 15 sequence type 131 (ST131) complex strains (11 from the WWTP and 4 from hospital wastewater). These ST131 complex strains were comprised of the following different subgroups: clade A (n ϭ 2), C1-M27 (n ϭ 8), and C1 (non-C1-M27) (n ϭ 1) for strains from the WWTP and clade A (n ϭ 2), C1-M27 (n ϭ 1), and C1 (non-C1-M27) (n ϭ 1) for strains from hospital wastewater. The results indicate that ESBLEC strains belonging to clinically important lineages, including the C1-M27 clade, may disseminate into the environment through wastewater, highlighting the need to monitor for antibiotic resistance in wastewater.