A new series of sulfamethoxazole derivatives bearing some biologically active heterocycles such as pyrazole (2), 3,4-dihydropyrimidin (3-7, 11, 12), pyrrole (9) and 1,3-dihydropyrimidin (10) rings were successfully synthesized. Identification of designed compounds was done by physicochemical properties and spectral measurements (1H-NMR, 13C-NMR and FT-IR). New prepared derivatives were assay for their (in vitro) antibacterial efficacy against four types of pathogenic bacterial isolates. Significant of the newly prepared compounds appeared promising activity comparison to the cephalexin standard drug. Most of the active compounds are docked into the effective site of tested bacterial enzymes obtained by crystal structure; results reveal the binding template to enzymes of bacteria, which closely related to the laboratory results.