Cancers develop as a result of driver mutations1,2 that lead to clonal outgrowth and the evolution of disease3,4. The discovery and functional characterization of individual driver mutations are central aims of cancer research, and have elucidated myriad phenotypes5 and therapeutic vulnerabilities6. However, the serial genetic evolution of mutant cancer genes7,8 and the allelic context in which they arise is poorly understood in both common and rare cancer genes and tumour types. Here we find that nearly one in four human tumours contains a composite mutation of a cancer-associated gene, defined as two or more nonsynonymous somatic mutations in the same gene and tumour. Composite mutations are enriched in specific genes, have an elevated rate of use of less-common hotspot mutations acquired in a chronology driven in part by oncogenic fitness, and arise in an allelic configuration that reflects context-specific selective pressures. cis-acting composite mutations are hypermorphic in some genes in which dosage effects predominate (such as TERT), whereas they lead to selection of function in other genes (such as TP53). Collectively, composite mutations are driver alterations that arise from context- and allele-specific selective pressures that are dependent in part on gene and mutation function, and which lead to complex-often neomorphic-functions of biological and therapeutic importance.