Cross-ecosystem fluxes can intertwine otherwise disparate food webs, but the effects of biodiversity at the genotypic level on fluxes across ecosystems boundaries is not known. Fresh leaves, which vary in traits such as defensive compounds against terrestrial herbivores, drop off trees and enter streams, providing a vital resource for riverine organisms. We demonstrate substantial variation in decomposition rates among individual trees in four different rivers in the Olympic Peninsula of Washington State, USA. We show that locally derived red alder leaf litter decomposes on average 24% faster than red alder leaf litter introduced from other riparian zones. Within rivers, leaves downstream of their parent trees decompose nearly as quickly as leaves from local trees. Leaves upstream of the parent tree decomposed as slowly as leaves from trees growing alongside different rivers. Over time, aquatic decomposer communities have locally adapted to the specific trees supplying the riparian subsidies. In energy-limited environments, such as small shaded streams, consumers must be efficient foragers. Our results indicate that this pressure for efficiency has led to adaptation at a particularly fine scale. More broadly, these results illustrate how genetic diversity and the effects of selection in one ecosystem can indirectly shape the structure of other ecosystems through ecological fluxes across boundaries.