A new series of isoxazolyl and thiazolyl urea derivatives was synthesized, fully characterized and evaluated in vitro as anticancer agents. The chemistry involves a facile protocol for the preparation of urea derivatives 12–22 through the reaction of isocyanates (p‐tolylsulfonyl isocyanate, p‐tolyl isocyanate, benzoyl isocyanate and ethylisocyanate) 8–11 with the corresponding aminoisoxazoles and aminothiazoles 2, 3, 6 and 7. The cytotoxicity of the synthesized compounds 12–22 were evaluated using human lung adenocarcinoma cell line (A549), cervical cancer cell line (HeLa), and breast cancer cell line (MCF7). All novel compounds (except compounds 12, 17, and 18) were potential cytotoxic against lung cancer as it displayed IC50s less than the reference drug (5‐Fluro uracil (5FU)). All tested compounds (except 15 and 19) showed strong inhibition of breast cancer cell line even much better than the 5FU. The tested compounds were less cytotoxic against cervical cancer except compounds 16, 19, 20, and 21. The molecular docking studies of the synthesized compounds against the three different proteins Janus kinase 2 (JAK2), cyclin dependent kinase‐2 (CDK2), and B‐cell lymphoma‐2 (BCL2) that are major proteins involved in pathogenesis of cancer were discussed. The molecular‐docking analyses revealed that compounds 13, 14 and 20 were the best docked ligand compared to reference docked ligands against the tested targeted proteins. In conclusion, the urea derivatives 13 and 14 were the most promising compounds with lowest IC50s against the tested cancer cell lines, and they displayed the lowest binding energies, critical hydrogen bonds and hydrophobic interactions with the molecular targets compared to other tested compounds.