The human brain stands out among mammals by being unusually large. The expensive-tissue hypothesis1 explains its evolution by proposing a trade-off between the size of the brain and that of the digestive tract, which is smaller than expected for a primate of our body size. Although this hypothesis is widely accepted, empirical support so far has been equivocal. Here we test it in a sample of 100 mammalian species, including 23 primates, by analysing brain size and organ mass data. We found that, controlling for fat-free body mass, brain size is not negatively correlated with the mass of the digestive tract or any other expensive organ, thus refuting the expensive-tissue hypothesis. Nonetheless, consistent with the existence of energy trade-offs with brain size, we find that the size of brains and adipose depots are negatively correlated in mammals, indicating that encephalization and fat storage are compensatory strategies to buffer against starvation. However, these two strategies can be combined if fat storage does not unduly hamper locomotor efficiency. We propose that human encephalization was made possible by a combination of stabilization of energy inputs and a redirection of energy from locomotion, growth and reproduction.