Cu alkyne‐azide cycloaddition was used to easily synthesize a library of novel heterocycles containing benzimidazole and piperidine based 1,2,3‐triazole(7a–7l) derivatives. The synthesized analogs were characterized by various spectroscopic techniques like FTIR, 1H nuclear magnetic resonance (NMR), 13C NMR, and mass spectrometry. All these novel bioactive compounds (7a–7l) were evaluated for in vitro antibacterial and antifungal efficacy. Compound 7k exhibited appreciable potent activity against Escherichia coli strain. Compounds 7a, 7b, 7f, and 7i showed excellent potent activity against all bacterial strains. Compound 7b, 7c, 7d, and 7g derivatives showed excellent effects when tested in vitro for antifungal activity against various fungal strains. Additionally, a molecular docking investigation revealed that compound 7k has the ability to bind to the active site of the E. coli DNA gyrase subunit protein and form hydrogen bonds with significant amino acid residues Asp73 and Asp49 in the active sites. In a 100 ns molecular dynamics simulation, the E. coli DNA gyrase protein's steady capacity to bind compound 7k was shown by the low measured root mean square deviation, which was an indication of the complex's conformational stability.