Brain size tripled in the human lineage over four million years, but why this occurred remains uncertain. To advance our understanding of what caused human-brain expansion, we mechanistically replicate it in-silico by modelling the evolutionary and developmental (evo-devo) dynamics of human-brain size. We show that, starting from australopithecine brain and body sizes, the model recovers major patterns of human development and evolution, the evolution of the hominin brain-body allometry, and the evolution of brain and body sizes of six Homo species. Analysis reveals that in this model the brain expands because ecology and seemingly culture make brain and developmentally late reproductive tissue sizes socio-genetically covariant. The direction of brain expansion is nearly orthogonal to the direction favoured by unconstrained selection. In contrast to long-held views, in this model, unconstrained selection that does not favour brain expansion provides a force that developmental constraints divert to cause human-brain expansion.