Ecological models predict that the effects of mammalian herbivore exclusion on plant diversity depend on resource availability and plant exposure to ungulate grazing over evolutionary time. Using an experiment replicated in 57 grasslands on six continents, with contrasting evolutionary history of grazing, we tested how resources (mean annual precipitation and soil nutrients) determine herbivore exclusion effects on plant diversity, richness, and evenness. Here we show that at sites with a long history of ungulate grazing, herbivore exclusion reduced plant diversity by reducing both richness and evenness, and the responses of richness and diversity to herbivore exclusion decreased with mean annual precipitation. At short with a short history of grazing, the effects of herbivore exclusion were not related to precipitation but differed for native and exotic plant richness. Thus, plant species’ evolutionary history of grazing continues to shape the response of the world’s grasslands to changing mammalian herbivory.