There is a well-established allometric relationship between brain and body mass in mammals. Deviation of relatively increased brain size from this pattern appears to coincide with enhanced cognitive abilities. To examine whether there is a phylogenetic structure to such episodes of changes in encephalization across mammals, we used phylogenetic techniques to analyse brain mass, body mass and encephalization quotient (EQ) among 630 extant mammalian species. Among all mammals, anthropoid primates and odontocete cetaceans have significantly greater variance in EQ, suggesting that evolutionary constraints that result in a strict correlation between brain and body mass have independently become relaxed. Moreover, ancestral state reconstructions of absolute brain mass, body mass and EQ revealed patterns of increase and decrease in EQ within anthropoid primates and cetaceans. We propose both neutral drift and selective factors may have played a role in the evolution of brain–body allometry.