Body size is closely related to the trophic level and abundance of soil fauna, particularly nematodes. Therefore, size-based analyses are increasingly prominent in unveiling soil food web structure and its responses to anthropogenic disturbances, such as livestock grazing. Yet, little is known about the effects of different livestock on the body size structure of soil nematodes, especially in grasslands characterized by local habitat heterogeneity. A four-year field grazing experiment from 2017 to 2020 was conducted in a meadow steppe characterized by typical mosaics of degraded hypersaline patches and undegraded hyposaline patches to assess the impacts of cattle and sheep grazing on the body size structure of soil nematodes within and across trophic groups. Without grazing, the hypersaline patches harbored higher abundance of large-bodied nematodes in the community compared to the hyposaline patches. Livestock grazing decreased large-bodied nematodes within and across trophic groups mainly by reducing soil microbial biomass in the hypersaline patches, with sheep grazing resulting in more substantial reductions compared to cattle grazing. The reduction in large-bodied nematode individuals correspondingly resulted in decreases in nematode community-weighted mean (CWM) body size, nematode biomass, and size spectra slopes. However, both cattle and sheep grazing had minimal impacts on the CWM body size and size spectra of total nematodes in the hyposaline patches. Our findings suggest that livestock grazing, especially sheep grazing, has the potential to simplify soil food webs by reducing large-bodied nematodes in degraded habitats, which may aggravate soil degradation by weakening the bioturbation activities of soil fauna. In light of the widespread land use of grasslands by herbivores of various species and the ongoing global grassland degradation of mosaic patches, the recognition of the trends revealed by our findings is critical for developing appropriate strategies for grassland grazing management.