Large mammalian herbivores substantially impact ecosystem functioning. As their populations are dramatically altered globally, disentangling their consumptive and non-consumptive effects is critical to advance mechanistic understanding and improve prediction of effects over ecosystem and Earth-system spatial extents. Mathematical models have played an important role in clarifying potential mechanisms of herbivore zoogeochemistry, based mostly on their consumptive effects as primary consumers and recyclers of organic and inorganic matter via defecation and urination. Trampling is a ubiquitous effect among walking vertebrates, but the consequences and potential mechanisms of trampling in diverse environments remain poorly understood. We derive a novel mathematical model of large mammalian herbivore effects on ecosystem nitrogen cycling, focusing on how trampling and environmental context impact soil processes. We model herbivore trampling with a linear positive or negative additive effect on soil-mediated nitrogen cycling processes. Combining analytical and numerical analyses, we find trampling by large mammalian herbivores is likely to decrease nitrogen mineralisation rate across diverse environments, such as temperate grassland and boreal forest. These effects are mediated by multiple potential mechanisms, including trampling-induced changes to detritivore biomass and functioning (e.g. rate of organic matter consumption). We also uncover scenarios where trampling can increase nitrogen mineralisation rate, contingent on the environment-specific relative sensitivity of detritivore mineral-nitrogen release and detritivore mortality, to trampling. In contrast to some consumptive mechanisms, our results suggest the pace of soil nitrogen cycling prior to trampling has little influence over the direction of the trampling net effect on nitrogen mineralisation, but that net effects may be greater in slow-cycling systems (e.g. boreal forests) than in fast-cycling systems (e.g. grasslands). Our model clarifies the potential consequences of previously overlooked mechanisms of zoogeochemistry that are common to all terrestrial biomes. Our results provide empirically testable predictions to guide future progress in empirical and theoretical studies of herbivore effects in diverse environmental contexts. Resolving ecological contingencies around animal consumptive and non-consumptive effects will improve whole-ecosystem management efforts such as restoration and rewilding.