The modern pygmy and dwarf sperm whales (Physeteroidea, Kogiidae) are remnants of a highly diverse group, which flourished in the Miocene oceans. Unlike their modern suction-feeding, deep-diving relatives, the past diversity of this family includes animals with disparate ecological habits. Here, we describe Scaphokogia totajpe, sp. nov., a new species of kogiid based on a well-preserved skull from the upper Miocene strata of the Pisco Formation, Peru. A phylogenetic analysis places S. totajpe as sister taxon of S. cochlearis and divides Kogiidae into two clades: the first including both species of Scaphokogia and the second including Kogia, Koristocetus, Praekogia, and Nanokogia. Similar to S. cochlearis, S. totajpe has a tubular rostrum with a hypertrophied mesorostral canal, a large supracranial basin, and a leftward deviated facial sagittal crest, but it differs by possessing a proportionately shorter rostrum, a reduced projection of the lacrimojugal between the frontal and the maxilla, and a flat occipital shield. The cranial morphology of Scaphokogia indicates that the extent of the nasal complex was greater than in modern kogiids. Furthermore, the overall rostrum shape and the reconstructed muscle insertion sites indicate that Scaphokogia retained some plesiomorphic features related to a more generalist ecology. Inclusion of S. totajpe into the context of the Pisco Formation indicates that during the late Miocene, the Peruvian coastal system was a hot spot for the diversification of physeteroids, with at least four species coexisting. Finally, Scaphokogia totajpe highlights a late Miocene diversity peak for sperm whales in the global oceans, before the Pliocene odontocete turnover.