The dynamic and reversible acetylation of proteins, catalysed by histone acetyltransferases (HATs) and histone deacetylases (HDACs), is a major epigenetic regulatory mechanism of gene transcription1and is associated with multiple diseases. Histone deacetylase inhibitors are currently approved to treat certain cancers, but progress on the development of drug-like histone actyltransferase inhibitors has lagged behind2. The histone acetyltransferase paralogues p300 and CREB-binding protein (CBP) are key transcriptional co-activators that are essential for a multitude of cellular processes, and have also been implicated in human pathological conditions (including cancer3). Current inhibitors of the p300 and CBP histone acetyltransferase domains, including natural products4, bi-substrate analogues5and the widely used small molecule C6466,7, lack potency or selectivity. Here, we describe A-485, a potent, selective and drug-like catalytic inhibitor of p300 and CBP. We present a high resolution (1.95 Å) co-crystal structure of a small molecule bound to the catalytic active site of p300 and demonstrate that A-485 competes with acetyl coenzyme A (acetyl-CoA). A-485 selectively inhibited proliferation in lineage-specific tumour types, including several haematological malignancies and androgen receptor-positive prostate cancer. A-485 inhibited the androgen receptor transcriptional program in both androgen-sensitive and castration-resistant prostate cancer and inhibited tumour growth in a castration-resistant xenograft model. These results demonstrate the feasibility of using small molecule inhibitors to selectively target the catalytic activity of histone acetyltransferases, which may provide effective treatments for transcriptional activator-driven malignancies and diseases.