New derivatives of 1,2,3-triazole and pyrazole were obtained from the work that was conducted in this research. Firstly, reaction of 2-Mercaptobenzimidazole (2-MBI) in a basic condition with methyl iodide gave 2-(methylthio)-1H-benzo[d]imidazole then compound (1) was reacted with sodium hydride in Dimethylformamide (DMF) at (0°C) to bring forth the salt of compound (1); subsequently, the produced salt was reacted with chloroacetylchloride to produce 2-chloro-1-(2-(methylthio)-1H-benzo[d]imidazol-1-yl)ethanone as starting compound (2). Thereafter, reaction of compound (2) was carried out through two pathways: first pathway, involved a reaction with sodium azide to give 2-azido-1-(2-(methylthio)-1H-benzo[d]imidazol-1-yl)ethanone compound (3) which was entered in 1,3-dipolar cycloaddition with α,β-unsaturated carbonyl compounds (a-e) to give 1,2,3-triazole derivatives (4a-e). While the second pathway was achieved by reaction with p-phenylenediaimine to give compound (5) then diazoniation to produce diazonium salt which was, in turn, coupled with acetylacetone to give compound (6). Subsequently, the product of the previous reaction was reacted with hydrazine derivatives (a-e) to give pyrazole derivatives (7a-e). The new prepared compounds were identified by Fourier Transform Infrared (FTIR), Proton Nuclear Magnetic Resonance (1H-NMR) and Carbon-13 Nuclear Magnetic Resonance (13C-NMR) and their physical properties were measured. Furthermore, we have evaluated the effect of some prepared compounds on some bacterial and fungal strains.