The village is led by a hunter who has proved his bravery by killing a Mammoth, and taking the White Spear. The people also strongly venerate an elderly woman, called Old Mother. Because of her different appearance to other humans in the village, it is assumed she is a Neanderthal, the "last of her kind," living with the Homo Sapiens of the village.
One day, D'Leh and several others are away when horse-raiders called the "Four Legged Demons" attack the Yaghal camp. The horse raiders enslave Evolet; D'Leh, Tic'Tic, KaRen, and Baku pursue them to save her. They enter a rainforest where they catch up with the raiding party. During the night, D'Leh rescues Evolet, but as they are trying to escape from the pursuing raiders, they are attacked by a large pack of terror birds. Tic'Tic gets wounded and Baku, Ka'Ren, Evolet are re-captured. Continuing on, they meet others whose loved ones were taken by the raiders. D'Leh and Tic'Tic befriend Nakudu, leader of the Naku tribe. He tells D'Leh of a prophecy: whoever talks to a Smilodon that they call the "Spear-Tooth" will help free their people. D'Leh had earlier saved the Spear-Tooth from drowning in a trap and it had spared his life. D'Leh realizes the prophecy was about him. Nakudu explains that his loved ones were taken in the "Great Red Birds," ships with large red sails, to the "Mountains of the Gods," from which no one has ever returned. They then come together with other tribes, who agree to form a coalition to pursue the raiders.
They find the ship with red sails holding Evolet and Baku. With no means to follow the ships, they journey through a vast desert, discovering an advanced civilization similar to ancient Egypt, ruled by an enigmatic figure known as "The Almighty," who is said to be the last survivor of his kind. It is implied in the script that he is a survivor of the fall of Atlantis, a civilization vastly more advanced than any other society at the time. The Almighty, who is regarded as a living god, possesses many thousands of slaves that he is using to build a huge pyramid complex in his honor. D'Leh finds an escaped servant of the Almighty and notices he is wearing a bracelet worn by D'Leh's father. D'Leh's father left his tribe for food and found the Naku tribe before being stolen by the raiders. In a night attack, the guards of the slaves discover D'Leh behind a pyramid. Tic'Tic dies from injuries sustained while killing the guards before they raise the alarm. Meanwhile, the Almighty's priests discover Evolet bears scars on her hand patterned after the "Mark of the Hunter," the constellation Orion. The priests believe it is part of a prophecy that whoever wears the mark of the Hunter is destined to kill The Almighty. D'Leh starts a full-scale rebellion among the slaves. They cause the mammoth herd used in building the pyramid to stampede, killing a large number of troops.
The Almighty offers Evolet to D'Leh in exchange for abandoning his rebellion. The Almighty says that if D'Leh takes his wife, his warriors can return, but the rest must be his slaves forever. D'Leh feigns acceptance of the deal which allows him to throw a spear at The Almighty and kill him, proving that he is not a god. During the ensuing battle, the raider obsessed with Evolet kidnaps her on horseback. Evolet grabs an arrow and stabs the warlord in the side, knocking them both off the horse. D'Leh rushes towards her, but the raider shoots her in the back with an arrow. D'Leh kills him and returns to Evolet, and she dies in his arms. The scene shifts to the tribe's wise woman as she breathes in deeply and then breathes out her last breath. The scene then returns to D'Leh still holding Evolet's body when she suddenly awakens, restored by the wise woman's sacrifice. They depart for home and bid farewell to the other tribes.
In an alternate ending, the scene shifts forward many years into the future, showing Baku's retelling of the story by the camp fire. It ends with a child asking what had happened to the "Mountains of the Gods," and Baku responds, "They were taken back by the sands. Lost to time, lost to man."