As pivotal epigenetic regulators, HDAC inhibitors exert antitumor effects by remodeling chromatin architecture and modulating gene expression profiles. However, current HDAC inhibitors demonstrate limited clinical efficacy in colorectal cancer due to selectivity with issues and dose-limiting toxicities. Herein, we developed novel β-carboline-based HDAC1/2 dual inhibitors, with particular emphasis on compound ZWZH-21 ,in which the oxygen atom serves as an innovative CU. In vitro antiproliferative assays revealed that ZWZH-21 displayed remarkable growth inhibition against colorectal cancer cell lines HCT116 and SW480, with IC50 values of 0.524 ± 0.023 μM and 1.063 ± 0.119 μM, respectively. The compound showed potent enzymatic inhibition against HDAC1/2 isoforms (IC50 = 34 nM and 41 nM, respectively) and possessed high selectivity for HDAC1/2 over other isoform. Western blot analysis demonstrated that ZWZH-21 significantly enhanced acetylation of the biomarker histone H3 and H4 while suppressing HDAC1/2 protein levels. Cellular thermal shift assay (CETSA) confirmed direct target engagement between ZWZH-21 and intracellular HDAC1/2. Furthermore, ZWZH-21 effectively inhibited proliferation and migration in multiple colorectal cancer cell models, induced apoptosis, and demonstrated robust antitumor efficacy in xenograft models without observable toxicity. These findings establish ZWZH-21 as a promising lead compound for development as a novel HDAC inhibitor with potential anticancer applications.