In 10,000 BC, a tribe of hunter-gatherers called the Yagahl live in a remote mountain range in the Urals and survive by killing woolly mammoths. D'Leh, a young hunter, has a companion named Evolet, an orphan who was found by the tribe. D'Leh, while hunting mammoths, manages to kill one and wins the "White Spear". He also wins Evolet in marriage, but feels he deserves neither since he killed the mammoth by accident.
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 are attacked by a large pack of terror birds. In this encounter, Tic'Tic gets wounded and Baku and Ka'Ren are captured. D'Leh rescues Evolet, but she is later 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 aSmilodon 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 ships with red sails holding Evolet and Baku. They have no means to follow the ships, so 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. 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 during the attack. 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 amongst the slaves. They cause the mammoth herd, used in building the pyramid, to stampede and kill 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, a raider kidnaps Evolet 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. 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 alternative 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."