Population expansions trigger many biomedical and ecological transitions, from tumor growth to invasions of non-native species. Although population spreading often selects for more invasive phenotypes, we show that this outcome is far from inevitable. In cooperative populations, mutations reducing dispersal have a competitive advantage. Such mutations then steadily accumulate at the expansion front bringing invasion to a halt. Our findings are a rare example of evolution driving the population into an unfavorable state and could lead to new strategies to combat unwelcome invaders. In addition, we obtain an exact analytical expression for the fitness advantage of mutants with different dispersal rates.