Understanding temporal patterns in biodiversity is an enduring question in paleontology. Compared with studies of taxonomic diversity, long-term perspectives on ecological diversity are rare, particularly in terrestrial systems. Yet ecological diversity is critical for the maintenance of biodiversity, especially during times of major perturbations. Here, we explore the ecological diversity of Cretaceous herbivorous dinosaurs leading up to the K-Pg extinction, using dental and jaw morphological disparity as a proxy. We test the hypothesis that a decline in ecological diversity could have facilitated their rapid extinction 66 Ma. We apply three disparity metrics that together capture different aspects of morphospace occupation and show how this approach is key to understanding patterns of morphological evolution. We find no evidence of declining disparity in herbivorous dinosaurs as a whole—suggesting that dinosaur ecological diversity remained high during the last 10 Myr of their existence. Clades show different disparity trends through the Cretaceous, but none except sauropods exhibits a long-term decline. Herbivorous dinosaurs show two disparity peaks characterized by different processes; in the Early Cretaceous by expansion in morphospace and in the Campanian by morphospace packing. These trends were only revealed by using a combination of disparity metrics, demonstrating how this approach can offer novel insights into macroevolutionary processes underlying patterns of disparity and ecological diversity.