The discovery in New Zealand of Late Holocene deposits of coprolites from extinct avian megaherbivores has provided a unique opportunity to gain a detailed insight into the ecology of these birds across ecologically diverse habitats. Macrofossil analysis of 116 coprolites of the giant ratite moa (Aves, Dinornithiformes) reveals a diverse diet of herbs and low shrubs in both semi-arid and high rainfall ecological zones, overturning previous models of moa as dominantly browsers of trees and shrubs. Ancient DNA analysis identified coprolites from four moa species (South Island giant moa, Dinornis robustus; upland moa, Megalapteryx didinus; heavy-footed moa, Pachyornis elephantopus and stout-legged moa, Euryapteryx gravis), revealing a larger dietary variation between habitat types than between species. The new data confirm that moa fed on a variety of endemic plant taxa with unusual growth forms previously suggested to have co-evolved with moa. Lastly, the feeding ecologies of moa are shown to be widely different to introduced mammalian herbivores.