Wastewater discharged from hospitals is a recognized contributor to the dissemination of antibiotic-resistant bacteria and their associated genetic traits into the environment. This study focused on the analysis of β-lactamase-producing pathogenic bacteria within untreated biomedical wastewater originating from various hospitals in Dhaka City, Bangladesh, as well as in silico evaluation and structural activity relationship mentioned antibiotics were evaluated. In silico drug design techniques were applied to identify the relationship with how the functional group impacts the binding energy. Out of the 184 isolates obtained from well-established hospital sewage discharge points in Dhaka, 89 were identified as β-lactamase positive. These bacteria were subjected to antimicrobial susceptibility testing using the VITEK-2 assay, and their profiles of extended-spectrum beta-lactamase (ESBL) production were determined through molecular methodologies. Among the β-lactamase-positive isolates, considerable resistance was observed, particularly against ampicillin, Ceftriaxone, Cefuroxime, and Meropenem. The predominant resistant species included Escherichia coli, Acinetobacter baumannii, Pseudomonas aeruginosa, and Enterobacter cloacae. The study identified the prevalence of ESBL-producing genes, with blaNDM-1 being the most prevalent, followed by blaOXA-1, blaSHV, blaCTX-M, and blaKPC. None of the isolates carried the blaTEM gene. In addition to characterizing these bacteria, the research explored ways to enhance the binding energy of four existing antibiotics as new inhibitors through computational studies. The findings revealed significant improvements in binding energy. Specifically, Meropenem initially exhibited a binding energy of −7.5 kcal/mol, notably increasing to −8.3 kcal/mol after modification. With an initial binding energy was only −7.9 kcal/mol, Ampicillin experienced an enhancement, reaching −8.0 kcal/mol post-modification. Similarly, Ceftriaxone, with an initial binding energy of −8.2 kcal/mol, increased to −8.5 kcal/mol following structural adjustments. Finally, Cefuroxime, initially registering a binding energy of −7.1 kcal/mol, substantially increased to −8.9 kcal/mol after modification. This finding establishes a foundation for future investigations in the development of modified antibiotics to address the issue of antibiotic resistance. It presents prospective remedies for the persistent problem of antibiotic-resistant bacteria in healthcare and the environment.