Transmissible cancers are malignant cell clones that spread among individuals through transfer of living cancer cells. Several such cancers, collectively known as bivalve transmissible neoplasia (BTN), are known to infect and cause leukaemia-like disease in marine bivalve molluscs. This is the case of BTN clones affecting the common cockle, Cerastoderma edule, which inhabits the Atlantic coasts of Europe and north-west Africa. To investigate the origin and evolution of contagious cancers in common cockles, we collected 6,854 C. edule specimens and diagnosed 390 cases of BTN. We then generated a reference genome for the species and assessed genomic variation in the genomes of 61 BTN tumours. Analysis of tumour-specific variants confirmed the existence of two cockle BTN lineages with independent clonal origins, and gene expression patterns supported their status as haemocyte-derived blood cancers. Examination of mitochondrial DNA sequences revealed several mitochondrial capture events in BTN, as well as co-infection of cockles by different tumour lineages. Mutational spectrum analyses identified two lineage-specific mutational signatures, one of which resembles a signature associated with DNA alkylation. Cytogenetic and copy number analyses uncovered genomes marked by pervasive instability and karyotypic plasticity. Whole-genome duplication, amplification of oncogenes CCND3, MDM2 and MYC, and deletion of the DNA alkylation repair gene MGMT, are likely drivers of BTN evolution. Characterization of satellite DNA identified elements that are absent from tumours despite vast expansions in the cockle germ line, suggesting ancient BTN clonal origins. Our study illuminates the evolution of transmissible cancers under the sea, and reveals long-term tolerance of extreme instability in neoplastic genomes.