Development in the fields of natural-product-derived and synthetic small molecules is in stark contrast to the ongoing demand for novel antimicrobials to treat life-threatening infections caused by extended-spectrum β-lactamase producing Escherichia coli (ESBL E. coli). Therefore, there is an interest in the antibacterial activities of synthesized N-(4-methylpyridin-2-yl) thiophene-2-carboxamides (4a–h) against ESBL-producing E. coli ST131 strains. A blood sample was obtained from a suspected septicemia patient and processed in the Bactec Alert system. The isolate’s identification and antibacterial profile were determined using the VITEK 2® compact system. Multi-locus sequence typing of E. coli was conducted by identifying housekeeping genes, while ESBL phenotype detection was performed according to CLSI guidelines. Additionally, PCR was carried out to detect the blaCTX-M gene molecularly. Moreover, molecular docking studies of synthesized compounds (4a–h) demonstrated the binding pocket residues involved in the active site of the β-lactamase receptor of E. coli. The result confirmed the detection of E. coli ST131 from septicemia patients. The isolates were identified as ESBL producers carrying the blaCTX-M gene, which provided resistance against cephalosporins and beta-lactam inhibitors but sensitivity to carbapenems. Among the compounds tested, 4a and 4c exhibited high activity and demonstrated the best fit and interactions with the binding pocket of the β-lactamase enzyme. Interestingly, the maximum of the docking confirmations binds at a similar pocket region, further strengthening the importance of binding residues. Hence, the in vitro and molecular docking studies reflect the promising antibacterial effects of 4a and 4c compounds.