All spoilers are unmarked.
A mother Iguanodon is tending to her nest when a Carnotaur attacks her herd. She is forced to abandon her eggs, and all but one are crushed by the Carnotaur during its' hunt. The surviving egg is taken by an Oviraptor, who loses it by dropping it in a river after a fight with another Oviraptor. A labyrinthodont nearly eats the egg before spitting it out, and the egg is nearly crushed by a herd of Pachyrhinosaurus and nearly goes over a waterfall before a Pteranodon snatches it from the river. The Pteranodon flies the egg across the endless plateaus of peacefully grazing dinosaurs before arriving at a faraway island to give the egg to its' young, but drops the egg in a scuffle with some Ichthyornis.
The egg lands on the island, which is populated entirely by lemurs. The patriarch, Yar, initially is suspicious of the baby Iguanodon that hatches from the egg, but allows his daughter Plio to raise it and name it Aladar. Years later, an adult Aladar lives a peaceful life on Lemur Island with his adopted family, but a meteor shower begins, culminating in the impact of a colossal meteor that sends deadly shockwaves towards the island. Aladar narrowly escapes annihilation by swimming to the mainland with Plio, Yar, and his siblings Zini and Suri, but to their dismay, they discover they are the only survivors of Lemur Island.
After journeying inland, the family is attacked by a pack of Velociraptors. They are chased into a huge, multispecies herd of dinosaurs, and Aladar is overjoyed to meet other members of his kind. The family joins the herd just as they make camp for the night, and befriend Baylene and Eema, an elderly Brachiosaurus and Styracosaurus, as well as Eema's pet Euoplocephalus Url. The trio of dinosaurs reveal to the family that the herd is migrating towards the Nesting Grounds, a valley where the herd goes yearly to lay their eggs and supposedly the last fertile area untouched by the meteor strike. However, the elders lament that they can hardly keep up with the herd as it is driven without mercy by Kron, the herd's stubborn Iguanodon leader and his lieutenant Bruton. Aladar asks Kron to slow the pace down, but Kron laughs him off and warns him to watch himself. However, Aladar's charm catches the eye of Kron's sister, Neera.
The next morning, the herd begins a long journey across the desert to reach a lake they've relied upon for past voyages. However, the herd is shocked when they find the lake empty. Kron has Bruton and a scout look for water, but has the herd keep moving. Neera warns Kron that going this long without water will kill half of the herd - but Kron insists that "we save the half that deserves to live". Eema, already exhausted, wanders into the lake bed crying about the lack of water. When Aladar and the others go after her, she is unresponsive and refuses to get up. Aladar and Zini notice strange gurgling under Baylene's footsteps, and soon discover that the water is actually buried under a thick layer of dirt. Aladar announces his discovery to the herd, but Kron and the other members of the herd rush in and fight over the water. Neera notices Aladar saving Eema from being trampled by the stampede, as well as Kron greedily pushing away his subjects when they try to drink.
That evening, Aladar and Suri help a pair of orphan Iguanodon find some water. Neera arrives and asks Aladar why he helped save the elders; Aladar is surprised when Neera says their way is survival-of-the-fittest. Aladar implores her to not follow Kron's ideology, and gets her some water. Plio, Yar, and Zini look on in approval, while Kron doesn't. Bruton returns, heavily wounded and missing the scout, and informs Kron that a pair of Carnotaurs have followed them from the south. Kron berates Bruton for supposedly leading the carnivores towards them and moves the herd out. When Aladar protests on behalf of the elders, Kron insists they'll slow down the predators. Aladar makes a stand and begs the herd to consider the elders, but Kron attacks him and warns him that any further interference will end his life. Aladar races back to the elders and tries to get them going, but the trio are too weak and tired to catch up, and the misfits are left behind. Hours later, the Carnotaurs arrive at the lakebed.
Aladar's group finds the injured Bruton, who rebuffs their attempts to help him. With a storm brewing, Url leads the group to a nearby cave to take shelter for the night. Bruton reluctantly joins the group, and Plio treats him with a medicinal plant. Bruton asks Plio why Aladar is pushing on the group with "false hope", and Plio responds that they're motivated by actual hope. Bruton suggests that he will die soon, and Plio says it's only the case if he gives up.
Later, the Carnotaurs arrive at the cave. Bruton alerts Aladar, and the group begins to retreat deeper into the cave. However, they accidentally lure the Carnotaurs in, and they discover Aladar when he's revealed by lightning. Aladar is nearly killed and eaten, but Bruton arrives and battles the two to save the group. Bruton holds his own, but causes a cave-in to kill the Carnotaurs. He manages to take one of them with him to the afterlife, while the other escapes the cave and resumes its' pursuit of the herd alone.
Meanwhile, the ever-depleting herd is on its' last legs. The orphans nearly collapse from exhaustion, but Neera helps them up, Aladar's beliefs clearly having rubbed off on her.
In the cave, the group meets a dead end. Zini and Suri smell fresh air, and after a little digging, open a small hole which lets in a bit of sunlight. Aladar tries to take down the blockade, but fails and creates an even bigger blockade. Enraged, Aladar gives up and professes that they weren't meant to survive. Baylene refutes this, and insists that it was he who convinced them that they could survive, and have survived this long. Insisting that she will continue to survive, Baylene begins pounding away at the barrier, joined by Eema and Url. Realizing that Kron was right in that the strong survive - but that the strongest are those that stick together - Aladar joins in. The group finally takes down the blockade, and walk into none other than the Nesting Grounds at last. As the group enjoys their new home, Eema notices that the old entrance to the valley has been blocked off by a rockslide. Aladar rushes off to warn the herd, narrowly avoiding the surviving Carnotaur.
Aladar finds the herd being forced up the mountain by Kron, who plans to have the herd climb over the rockslide. When Aladar proposes a safer path, Kron refuses and attacks Aladar when he loses his patience with the herd's leader. Aladar actually puts up a good fight, but Kron eventually gains the advantage and nearly kills Aladar, only to be knocked down by Neera. A shaken Kron watches as Aladar and Neera leave him, along with the rest of the herd. Suddenly, the Carnotaur arrives, and though the herd panics, Aladar leads the herd in scaring off the Carnotaur through bellowing and sheer numbers. The Carnotaur decides to go after Kron, and Neera and Aladar are too late to save Kron from being mauled to death. Aladar is able to push the Carnotaur off of the cliff, killing it. After mourning Kron, Aladar and Neera return the herd to the Nesting Grounds.
One year later, Aladar and Neera are mates and welcome in a clutch of eggs, with Baylene, Eema, Plio, and Yar as honorary grandparents. Zini discovers a tribe of lemurs native to the valley, and the herd celebrates the birth of Aladar and Neera's children and a new generation of dinosaurs.