Multiple cell-signalling pathways converge on chromatin to induce gene expression programmes. The inducible transcriptional programmes that are established as a result of inflammatory or oncogenic signals are controlled by shared chromatin regulators. Therapeutic targeting of such chromatin dependencies has proved effective for controlling tumorigenesis and for preventing immunopathologies that are driven by overt inflammation. In this Review, we discuss how chromatin dependencies are established to regulate the expression of key oncogenes and inflammation-promoting genes and how a better mechanistic understanding of such chromatin dependencies can be leveraged to improve the magnitude, timing, duration and selectivity of cell responses with the aim of minimizing unwanted cellular and systemic effects. Recently, exciting progress has been made in cancer immunotherapy and in the development of drugs that target chromatin regulators. We discuss recent advances in clinical trials and the challenge of combining immune-cell-based therapies and epigenetic therapies to improve human health.