What are the mechanisms that allow species to extend their ranges and adapt to the novel environmental conditions they find in the newly available habitat? The study of parallel adaptation of pairs of populations to similar environments can provide great insights into this question. Here, we test for parallel evolution driven by niche specialization in a highly social marine mammal, the common bottlenose dolphin, Tursiops truncatus, and investigate the origins of the genetic variation driving local adaptation. Coastal ecotypes of common bottlenose dolphins have recurrently emerged in multiple regions of the world from pelagic ecotype populations, when novel habitat became available. Analyzing the whole genomes of 57 individuals using comparative population genomics approaches, we found that coastal ecotype evolution was relatively independent between the Atlantic and Pacific, but related between different regions within the Atlantic. We show that parallel adaptation to coastal habitat was facilitated by repeated selection on ancient alleles present as standing genetic variation in the pelagic populations. Genes under parallel adaptation to coastal habitats have roles in cognitive abilities and feeding. Therefore, parallel adaptation in long-lived social species may be driven by a combination of ecological opportunities, selection acting on ancient variants, and stable behavioural transmission of ecological specialisations. Tried and tested genetic variation that has been subject to repeated bouts of selection, may promote linked adaptive variants with minimal pleiotropic effects, thereby facilitating their persistence at low frequency in source populations and enabling parallel evolution.