Three astronauts are catapulted into the future. Soon Judy is swallowed by the Earth and Bill and Jeff wind up in the company of primitive humans who are captured by talking apes.
The astronauts lead the humanoids to New Valley and stumble upon fellow astronaut Brent. Meanwhile General Urko tries to find the thief who stole his plane.
Jeff and Bill discover an entrance to the lair of the Underdwellers, where they discover they've returned to Earth and find a brainwashed Judy in cahoots with the locals.
Cornelius and Zira take advantage of Urko's demotion to try and attempt to salvage an old hot-air balloon. Little do they know, the dragon is back, so Bill and Cornelius must team up with an ancient ape god to stop it.