The functional role of herbivores in tropical rainforests remains poorly understood. We quantified the magnitude of, and underlying controls on, carbon, nitrogen and phosphorus cycled by invertebrate herbivory along a 2800 m elevational gradient in the tropical Andes spanning 12°C mean annual temperature. We find, firstly, that leaf area loss is greater at warmer sites with lower foliar phosphorus, and secondly, that the estimated herbivore-mediated flux of foliar nitrogen and phosphorus from plants to soil via leaf area loss is similar to, or greater than, other major sources of these nutrients in tropical forests. Finally, we estimate that herbivores consume a significant portion of plant carbon, potentially causing major shifts in the pattern of plant and soil carbon cycling. We conclude that future shifts in herbivore abundance and activity as a result of environmental change could have major impacts on soil fertility and ecosystem carbon sequestration in tropical forests.