A study of the evolutionary history of cortical folding in mammals, its relationship to physiological and life-history traits and the underlying cortical progenitor behavior during embryogenesis, explains the diversity of folding we see across modern mammals. The diversity of neocortical folding among mammals can be explained by two distinct neurogenic programs, which give rise to mammals with a highly folded neocortex and mammals with slightly folded or unfolded neocortex, each occupying a distinct ecological niche.