Imidazole-based pyrimidine hybrids are considered a remarkable class of compounds in pharmaceutical chemistry. Here, we report the anticancer bioactivities of eleven imidazole-based pyrimidine hybrids (1–11) that specifically target cytosolic carbonic anhydrase (CAs) isoenzymes, including human CA-II and human CA-IX (hCA-II, and hCA-IX). A highly eco-friendly aqueous approach was used for the formation of a carbon–carbon bond by reacting aromatic nitro group substitution of nitroimidazoles with carbon nucleophiles. The in vitro results indicate that this new class of compounds (1–11) includes significant inhibitors of hCA IX with IC50 values in the range of 9.6 ± 0.2–32.2 ± 1.0 µM, while hCA II showed IC50 values in range of 11.6 ± 0.2–31.1 ± 1.3 µM. Compound 2 (IC50 = 12.3 ± 0.1 µM) showed selective inhibition for hCA-II while 7, 8, and 10 (IC50 = 9.6–32.2 µM) were selective for hCA-IX. The mechanism of action was investigated through in vitro kinetics studies that revealed that compounds 7, 3, 11, 10, 4, and 9 for CA-IX and 1, 2, and 11 for CA-II are competitive inhibitors with dissociation constant (Ki) in the range of 7.32–17.02 µM. Furthermore, the in situ cytotoxicity of these compounds was investigated in the human breast cancer cell line MDA-MB-231 and compared with the normal human breast cell line, MCF-10A. Compound 5 showed excellent anticancer/cytotoxic activity in MDA-MB-231 with no toxicity to the normal breast cells. In addition, in silico molecular docking was employed to predict the binding mechanism of active compounds with their targets. This in silico observation aligned with our experimental results. Our findings signify that imidazole-based hybrids could be a useful choice to design anticancer agents for breast and lung tumors, or antiglaucoma compounds, by specific inhibition of carbonic anhydrases.