Supergenes are sets of genes that are inherited as a single marker and encode complex phenotypes through their joint action. They are identified in an increasing number of organisms, yet their origins and evolution remain enigmatic. In Atlantic cod, four large supergenes have been identified and linked to migratory lifestyle and environmental adaptations. Here, we investigate the origin and fate of these four supergenes through analysis of whole-genome-sequencing data, including a new long-read-based genome assembly for a non-migratory Atlantic cod individual. We corroborate that chromosomal inversions underlie all four supergenes, and show that they originated separately, between 0.40 and 1.66 million years ago. While introgression was not involved in the origin of the four supergenes, we reveal gene flow between inverted and noninverted supergene haplotypes, occurring both through gene conversion and double crossover. Moreover, the presence of genes linked to salinity adaptations in a sequence transferred through double crossover indicates that these sequences exchanged between the haplotypes are subject to selection. Our results suggest that the fate of supergenes is comparable to that of hybridizing species, by depending on the degree to which separation is maintained through purging of introduced genetic variation.