Extensively managed grasslands are globally recognized for their high biodiversity value. Over the past century, a continuous loss and degradation of grassland habitats has been observed across Europe that is mainly attributable to agricultural intensification and land abandonment. Particularly insects have suffered from the loss of grassland habitats due to land-use change and the decrease in habitat quality, either due to an increase in livestock density, higher mowing frequency, and an increase in nitrogen fertilization, or by abandonment. However, only a few studies have used nationwide datasets to analyse the effects of land cover and land-use intensity on insects. It further remains largely unexplored how these effects are modulated by species traits, i.e. habitat specialisation and mobility. Using nationwide butterfly data originating from the German Butterfly Monitoring Scheme, we investigated the effect of three indicators related to land cover and agricultural land-use intensity on species richness as well as trait composition of butterfly communities. Based on agricultural census data at the municipality scale, we calculated the share of permanent grasslands (measure of habitat availability), the total livestock density (proxy for organic fertilization) and the livestock density of domestic herbivores (proxy for management intensity in grasslands) within a 2 km buffer surrounding each butterfly transect. To analyse the relationships between butterflies and indicators of land cover and land-use intensity, we applied generalised linear mixed effect models. We found a negative relationship between butterfly species richness and the livestock density of domestic herbivores. Further, the ratio of butterfly generalist to specialist species shifted towards generalists and the size of butterflies increased with higher herbivore livestock density, indicating a shift in communities towards mobile habitat generalists. Our results are in accordance with previous studies carried out across smaller geographic extents, highlighting the importance of low herbivore livestock densities to halt the loss of pollinating insects and safeguard biodiversity and associated ecosystem services in agricultural landscapes. We here demonstrate that indicators based on livestock distribution data at the municipality scale can provide insights into processes and spatial diversity patterns of butterflies at the national level. Further, we highlight potentials and limitations of using agricultural census data to quantify and assess effects of land cover and land-use intensity on butterflies, and make recommendations for further research needs.