Abstract Ungulate herbivores shape grassland plant communities at multiple scales, ultimately affecting ecosystem function. However, ungulates have complex effects on grasslands, including defoliation, trampling, excreta return and their interactions. Moreover, the effects of ungulate density on grasslands are regulated by these three mechanisms. Nevertheless, how these three mechanisms affect biodiversity at multiple scales and community assembly remains poorly understood. Here, we conducted a 4‐year novel field experiment to disentangle the effects of defoliation, trampling, and excreta return by ungulates on plant community assembly in a temperate grassland in Inner Mongolia, China. This experiment set two different scenarios: moderate ungulate density (Moderate, characterised by selective defoliation and moderate trampling) and high ungulate density (Intense, characterised by non‐selective defoliation and heavy trampling), including different combinations of defoliation, trampling and excreta return in each scenario. We found that defoliation and trampling increased stochasticity in community assembly and promoted alpha and beta diversity under both scenarios. Specifically, defoliation promoted the coexistence of species with multiple resource acquisition strategies (higher functional trait diversity) by reducing interspecific competition; trampling tended to facilitate random species colonisation. Conversely, excreta return favoured grasses, promoting deterministic assembly and impacting species coexistence. Notably, selective defoliation in the Moderate scenario led to a dominance of stochastic processes during community assembly, whereas non‐selective defoliation still did not change the dominance of deterministic processes. Further, communities subject to selective defoliation were insensitive to changes in soil properties caused by trampling and excreta return, maintaining a high‐level beta diversity and the stochastic of community assembly. Synthesis: Our study provides important insights into the mechanisms by which ungulate herbivores influence plant community assembly, suggesting that defoliation and trampling have the potential to drive stochastic processes, while excreta return plays the opposite role. Our study also suggests that selective foraging by ungulates acts as stronger stochastic forces during community assembly compared to non‐selective defoliation. These results imply that considering ungulate feeding preferences and foraging behaviour in grassland management will help prevent biodiversity loss and biotic homogenisation.