Diarrheal disease (DD) due to contaminated water is a major cause of child mortality globally. Forests and wetlands can provide ecosystem services that help maintain water quality. To understand the connections between land cover and childhood DD, we compiled a database of 293,362 children in 35 countries with information on health, socioeconomic factors, climate, and watershed condition. Using hierarchical models, here we find that higher upstream tree cover is associated with lower probability of DD downstream. This effect is significant for rural households but not for urban households, suggesting differing dependence on watershed conditions. In rural areas, the effect of a 30% increase in upstream tree cover is similar to the effect of improved sanitation, but smaller than the effect of improved water source, wealth or education. We conclude that maintaining natural capital within watersheds can be an important public health investment, especially for populations with low levels of built capital.