A series of 5-(pyridin-4-yl)-N-substituted-1,3,4-oxadiazol-2-amines (3a-d), 5-(pyridin-4-yl)-N-substituted-1,3,4-thiadiazol-2-amines (4a-d) and 5-(pyridin-4-yl)-4-substituted-1,2,4-triazole-3-thiones (5a-d) were obtained by the cyclization of hydrazinecarbothioamide derivatives 2a-d derived from isonicotinic acid hydrazide. Aminoalkylation of compounds 5a-d with formaldehyde and various secondary amines furnished the Mannich bases 6a-p. The structures of the newly synthesized compounds were confirmed on the basis of their spectral data and elemental analyses. All the compounds were screened for their in vitro anticancer activity against six human cancer cell lines and normal fibroblast cells. Sixteen of the tested compounds exhibited significant cytotoxicity against most cell lines. Among these derivatives, the Mannich bases 6j, 6m and 6p were found to exhibit the most potent activity. The Mannich base 6m showed more potent cytotoxic activity against gastric cancer NUGC (IC50=0.021 µM) than the standard CHS 828 (IC50=0.025 µM). Normal fibroblast cells WI38 were affected to a much lesser extent (IC50>10 µM).