The mechanisms underlying transcriptional dysregulation in tumorigenesis have received considerable attention as promising therapeutic targets to combat human cancer. Cyclin-dependent kinase 9 (CDK9) and class I histone deacetylases (HDACs) are significant therapeutic targets due to their pivotal roles in the dysregulated transcriptional programs characteristic of many cancers. Furthermore, the combinatorial transcriptional therapy with CDK9 and class I HDAC inhibitors has been shown to have a synergistic anticancer effect. In this study, a series of novel N-(2-amino-phenyl)-5-(4-aryl-pyrimidin-2-yl) amino)-1H-indole-2-carboxamide derivatives were designed and synthesized as novel dual-functional inhibitors targeting CDK9 and HDAC signaling pathways for cancer treatment. Among the synthesized compounds, 13ea demonstrated potent anti-proliferative activities (IC50 < 5.0 μM) in various cancer cell lines (HeLa, MDA-MB-231, HepG2). In addition, 13ea was found to significantly inhibit the phosphorylation function of CDK9 and the deacetylation function of class I HDACs. Furthermore, 13ea was found to inhibit the protein activity of CDK9 (IC50 = 0.17 μM), HDAC1 (IC50 = 1.73 μM), and HDAC3 (IC50 = 1.11 μM). The docking studies predicted the binding patterns of 13ea in the active pockets of CDK9 and HDAC1/3. The cellular assays revealed that 13ea induced mitochondria-related apoptosis and G2/M phase arrest in cancer cells, showing superior activities compared to those of AZD-5438 (a CDK9 inhibitor) and Mocetinostat (an inhibitor of class I HDACs). Notably, the in vivo assay demonstrated that 13ea (30 mg/kg) exhibited significant inhibition on MDA-MB-231 xenograft tumor growth, with a tumor shrinkage rate of 76.83 %. In summary, we have identified 13ea as a novel CDK9/HDAC inhibitor with excellent anticancer activity in vitro and in vivo.