A continent-wide genomic study reveals African elephants once freely intermingled across savanna and forest habitats. Modern genomic patterns show the effects of ivory poaching and habitat fragmentation on both elephant species.