Pinnipeds (seals and related species) use their whiskers to explore their environment and locate their prey. Today they live mostly in marine habitats and are adapted for a highly specialised amphibious lifestyle with their flippers for locomotion and a hydrodynamically streamlined body. The earliest pinnipeds, however, lived on land and in freshwater habitats, much like mustelids today. Here we reconstruct the underwater foraging behaviour of one of these earliest pinnipeds (Potamotherium), focusing in particular on how it used its whiskers (vibrissae). For this purpose, we analyse the coronal gyrus of the brain of 7 fossil and 31 extant carnivorans. This region receives somatosensory input from the head. Our results show that the reliance on whiskers in modern pinnipeds is an ancestral feature that favoured survival of stem pinnipeds in marine habitats. This study provides insights into an impressive ecological transition in carnivoran evolution: from terrestrial to amphibious marine species. Adaptations for underwater foraging were crucial for this transition.