Metallo-β-lactamase (MBL)-producing carbapenem-resistant Enterobacterales (CRE) pose an emerging threat to public health worldwide. An effective inhibitor of MBLs is therefore urgently needed for clinical use. In this study, two acyclic pyridine-containing ligands, H<sub>2</sub>dedpa and compound 8, were discovered with excellent activities when combined with meropenem (MEM) against MBL (bla<sub>NDM</sub> and bla<sub>IMP</sub>)-producing clinical isolates, including Escherichia coli, Citrobacter freundii, Proteus mirabilis, Enterobacter cloacae and Klebsiella pneumoniae. In particular, these two compounds improved the activity of MEM against E. coli harboring the bla<sub>NDM-4</sub> gene by nearly 40,960 times. H<sub>2</sub>dedpa (IC<sub>50</sub> = 0.17 ± 0.04 μM) and compound 8 (IC<sub>50</sub> = 0.04 ± 0.02 μM) showed higher inhibitory activity against bla<sub>NDM-1</sub> enzyme than the positive control ethylenediaminetetraacetic acid (EDTA, IC<sub>50</sub> = 28.84 ± 0.70 μM). A sterilization kinetics experiment showed that H<sub>2</sub>dedpain combined with MEM could kill 99.9% of bacteria within 24 h H<sub>2</sub>dedpa and compound 8 are therefore promising MBL inhibitors.