A series of new N‐(2‐aminophenyl)‐2‐arylquinoline‐4‐carboxamide and N‐(2‐aminophenyl)‐2‐arylbenzo[h]quinoline‐4‐carboxamide derivatives were designed and synthesized. The cytotoxicity of the synthesized compounds was investigated on three cell lines A549, HT‐29 and HCT116. The synthesized compounds, despite simple structures, displayed moderate to good cytotoxicity. Pan‐HDAC inhibitory activity of the synthesized compounds was evaluated on two cell lines, HT‐29 and HCT116, which displayed inhibitory activity (%) of 9.77–50.39 % on HT‐29 and 7.1–53.64 % on HCT116 cell line at concentrations of 100 μM. The compounds 11 h, 11 k, 11 l, 11 m, 12 b, 12 c and 12 e with the best cytotoxicity (%) and Pan‐HDAC inhibitory activity (%) were selected to determine IC50 values. IC50 values were calculated from 18.5–43.5 μM on HCT116 compared to 15.9 μM for CI‐994 and 35.5–75.9 μM on HT‐29 compared to 33.65 μM for CI‐994. Pan‐HDAC inhibitory activity of these compounds was more than 100 μM on HCT116 cell line except for compound 12 e (85.75±7.49 μM). Docking study of selected compounds (11 h, 11 k, 11 l, 11 m, 12 b, 12 c and 12 e) was performed on HDAC isoforms that displayed the best docking scores on sirtuins.