The Harbour porpoise (Phocoena phocoena) is a highly mobile cetacean species which primarily occurs in coastal and shelf waters across the Northern hemisphere. It inhabits heterogeneous seascapes that vary broadly 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 8 localities across the North Atlantic and adjacent waters, which we used for population structure, demographic, and genotype-environment association analyses. Our results support a genetic differentiation between three subspecies, and three distinct populations within the subspecies P.p. phocoena: Atlantic, Belt Sea and Proper Baltic Sea. Effective population size and Tajima’s D levels suggest a population contraction in both Black Sea and Iberian porpoises while a population expansion in the P.p. phocoena populations. Phylogenetic trees indicate a post-glacial colonization of Harbour porpoises from a southern refugium. Genotype-environment association analysis identified salinity as a major driver in genomic variation and we identified candidate genes putatively underlying adaptation to different salinity levels. Our study highlights the value of whole genome resequencing to unravel subtle population structure in highly mobile species and shows how strong environmental gradients and local adaptation may lead to population differentiation. The results have great conservation implications as we found major levels of inbreeding and low genetic diversity in the endangered Black Sea subspecies and identified the critically endangered Proper Baltic Sea porpoises as a separate population.