The Harbour porpoise (Phocoena phocoena) is a highly mobile cetacean species primarily occurring in coastal and shelf waters across the Northern hemisphere. It inhabits heterogeneous seascapes broadly varying in salinity and temperature. Here, we produced 74 whole genomes at intermediate coverage to study Harbour porpoise's evolutionary history and investigate the role of local adaptation in the diversification into subspecies and populations. We identified ~6 million high quality SNPs sampled at eight localities across the North Atlantic and adjacent waters, which we used for population structure, demographic and genotype–environment association analyses. Our results suggest a genetic differentiation between three subspecies (P.p. relicta, P.p. phocoena and P.p. meridionalis), and three distinct populations within P.p. phocoena: Atlantic, Belt Sea and Proper Baltic Sea. Effective population size and Tajima's D suggest population contraction in Black Sea and Iberian porpoises, but expansion in the P.p. phocoena populations. Phylogenetic trees indicate post‐glacial colonization from a southern refugium. Genotype–environment association analysis identified salinity as major driver in genomic variation and we identified candidate genes putatively underlying adaptation to different salinity. Our study highlights the value of whole genome resequencing to unravel subtle population structure in highly mobile species, shows how strong environmental gradients and local adaptation may lead to population differentiation, and how neutral and adaptive markers can give different perspectives on population subdivision. The results have great conservation implications as we found inbreeding and low genetic diversity in the endangered Black Sea subspecies and identified the critically endangered Proper Baltic Sea porpoises as a separate population.