Pyridine, 1,3,4-thiadiazole, and 1,3-thiazole derivatives have various biological activities, such as antimicrobial, analgesic, anticonvulsant, and antitubercular, as well as other anticipated biological properties, including anticancer activity. The starting 1-(3-cyano-4,6-dimethyl-2-oxopyridin-1(2H)-yl)-3-phenylthiourea (2) was prepared and reacted with various hydrazonoyl halides 3a–h, α-haloketones 5a–d, 3-chloropentane-2,4-dione 7a and ethyl 2-chloro-3-oxobutanoate 7b, which afforded the 3-aryl-5-substituted 1,3,4-thiadiazoles 4a–h, 3-phenyl-4-arylthiazoles 6a–d and the 4-methyl-3- phenyl-5-substituted thiazoles 8a,b, respectively. The structures of the synthesized products were confirmed by spectral data. All of the compounds also showed remarkable anticancer activity against the cell line of human colon carcinoma (HTC-116) as well as hepatocellular carcinoma (HepG-2) compared with the Harmine as a reference under in vitro condition. 1,3,4-Thiadiazole 4h was found to be most promising and an excellent performer against both cancer cell lines (IC50 = 2.03 ± 0.72 and 2.17 ± 0.83 µM, respectively), better than the reference drug (IC50 = 2.40 ± 0.12 and 2.54 ± 0.82 µM, respectively). In order to check the binding modes of the above thiadiazole derivatives, molecular docking studies were performed that established a binding site with EGFR TK.