Klebsiella pneumoniae, a Gram-negative bacterium, poses a significant public health threat due to its resistance to various antibiotics, including β-lactams and carbapenems. This resistance is mainly due to the production of Klebsiella pneumoniae carbapenemases (KPCs). The issue of KPC-2 and its variant, KPC-3, by K. pneumoniae strains, results in resistance to the substrate imipenem and β-lactamase inhibitors. Using Schrodinger software, we performed a high-throughput virtual screening of 374 compounds from the ChemDiv natural compound library in this study, targeting KPC-2 and KPC-3. The top compounds were identified using Extra Precision (XP) mode. Molecular dynamics simulations (MDS) were performed for 500 ns using GROMACS. Among the compounds, N075-0013 and N098-0051 for KPC-2 and N025-0014 and N099-0011 for KPC-3 exhibited binding energies ranging from -5.40 to -7.01 kcal/mol against both KPC-2 and KPC-3. The complexes formed with these compounds remained stable in their dynamic environments, suggesting their potential as effective inhibitors of KPC-2 and KPC-3. These results underscore the potential therapeutic promise of these compounds, justifying further in vitro and in vivo validation for their development as inhibitors of Klebsiella pneumoniae carbapenemases.