Cyclin-Dependent Kinase 9 (CDK9) as part of the PTEFb complex promotes transcriptional elongation and high-level gene expression. We now report that, paradoxically, CDK9 is also essential for maintaining gene silencing at heterochromatic loci. Through a live cell screen, we discovered that CDK9 inhibition reactivates epigenetically silenced genes in cancer, leading to restored tumor suppressor gene expression and cell differentiation, along with activation of endogenous retrovirus (ERV) genes. CDK9 inhibition maintains gene silencing directly through phosphorylation of the SWI/SNF protein SMARCA4 and indirectly through HP1α activation. Based on gene activation, we developed the highly selective and 2 potent CDK9 inhibitor MC180295 (IC50 =5.1nM) that has broad anti-cancer activity in-vitro and is effective in in-vivo cancer models. Additionally, CDK9 inhibition synergizes with the immune checkpoint inhibitor α-PD-1 in vivo, making it an excellent target for epigenetic therapy of cancer.