The dynamic and reversible acetylation of proteins, catalysed by histone acetyltransferases (HATs) and histone deacetylases (HDACs), is a major epigenetic regulatory mechanism of gene transcription and 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 behind. 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 cancer). Current inhibitors of the p300 and CBP histone acetyltransferase domains, including natural products, bi-substrate analogues and the widely used small molecule C646, 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.