Ellie and Manny, the two woolly mammoths, are expecting their first child, and Manny struggles to make life perfect and safe for the family. At the same time, Diego the saber-toothed cat finds himself unable to catch a cocky gazelle he has been stalking and decides to leave The Herd, believing that he is losing his predatory nature as a tiger. Sid the ground sloth begins to wish for a family of his own and takes three apparently abandoned eggs that he finds in an icy underground cavern and calls them Egbert, Shelly, and Yoko. Manny tells him to put them back, but Sid ignores Manny and looks after the eggs, which hatch into baby Tyrannosaurus rex the next morning.
Although Sid tries his best to raise the three dinosaurs, their rambunctious behavior scares away all the younger animals and ruins a playground Manny built for his child. Not long after, a female Tyrannosaurus rex, whose eggs Sid stole, returns and carries both Sid and her young underground, with Diego in pursuit. Manny, Ellie, Crash and Eddie the opossums follow as well and discover that the icy cavern leads to a vast subterranean jungle populated by dinosaurs thought to be extinct. Here, an angry Ankylosaurus threatens The Herd despite Diego's efforts to fend it off; they are saved from a further crowd of angry reptiles by a deranged, quick witted, one-eyed weasel named Buck.