Dastan, a street urchin in Persia, is adopted by King Sharaman after showing courage. Fifteen years later, the king's brother Nizam relays evidence to the princes—Dastan, along with the king's biological sons Tus and Garsiv—that the holy city of Alamut is forging weapons for Persia's enemies. Tus directs the Persian army to capture Alamut. Dastan and his friends breach the city and open a gate for the siege. During the attack, Dastan defeats a royal guard and takes from him a sacred dagger.
Alamut falls to the Persians, but Princess Tamina denies that the city has any weapon forges. Tus asks her to marry him to unite the two nations, and she only accepts after seeing the dagger in Dastan's possession. At their celebratory banquet, Tus has Dastan give their father an embroidered robe. However, the robe is poisoned, fatally burning Sharaman. Garsiv accuses Dastan of the king's murder, but Dastan escapes with Tamina. Tus is appointed king and a bounty on Dastan’s head is set.
While in hiding, Tamina attempts to kill Dastan and steal the dagger, and in the struggle Dastan discovers the dagger enables the wielder to travel back in time. Dastan concludes that Tus invaded Alamut for the dagger, and decides to confront his brother at the funeral of the king in Avrat. On the way, the two are captured by merchant-bandits led by Sheik Amar who seeks the reward money, but they manage to escape. After arriving in Avrat, Dastan tries to convince Nizam of his innocence. Seeing burns on Nizam's hands, Dastan realizes that Nizam orchestrated the king's murder. Furthermore, Nizam has set up an ambush for Dastan along the Persian streets, but after a conflict with Garsiv, Dastan escapes. Nizam sends a group of covert warriors, the Hassansins, to kill Dastan and find the dagger.
During a sandstorm, Tamina tells Dastan that long ago, the gods unleashed a great sandstorm to destroy humanity but were moved by a young girl's offer to sacrifice herself in humanity's place and trapped the Sands of Time in a large sandglass. Tamina is the latest guardian of the dagger, given to the young girl by the gods, which can pierce the sandglass and potentially destroy the world but also enable the dagger's wielder to travel further back in time than the one minute's worth of sand the dagger holds. Dastan realizes that Nizam intends to travel back to his childhood, prevent himself from saving Sharaman from a lion attack, and grow up to become King of Persia in Sharaman's place. Amar captures the two again, but Dastan saves Amar's men from a Hassansin attack using the dagger. This convinces Amar to escort them to a sanctuary near the Hindu Kush, where Tamina will seal the dagger within the stone it first came from. At the sanctuary, they are found by Garsiv, whom Dastan convinces of his innocence, but the Hassansins ambush them, killing Garsiv and stealing the dagger.
Dastan's group travels back to Alamut to retrieve the dagger from Nizam and warn Tus of Nizam. Amar's right-hand man Seso dies retrieving the dagger for Dastan, who demonstrates the dagger's powers to Tus to convince him of the truth. Afterwards, Nizam interrupts them, kills Tus, and takes the dagger back. Tamina saves Dastan from being killed and the two head for the secret tunnels beneath the city that lead to the sandglass. When they reach Nizam, he stabs the sandglass and throws them both off a cliff. Tamina sacrifices herself, releasing Dastan's hand and falling to her death to allow him to fight Nizam.
Nizam thrusts the dagger into the esoterical column of sandglass under the temple. Dastan grabs hold of the hilt of the dagger together with Nizam; as sand is released from the sandglass, time rewinds to the moment Dastan found the dagger. He finds Tus and Garsiv and exposes Nizam's treachery. Nizam tries to kill Dastan, but Dastan easily defeats him yet spares him. Nizam gets up and attempts to attack again but is subdued and killed by Tus. Tus apologizes to Tamina for the siege and proposes to strengthen the two nations' bond by marital alliance of the Princess to Dastan. Dastan returns the dagger to Tamina as an engagement gift and tells her he looks forward to their future together.
Jake Gyllenhaal as Prince Dastan
William Foster as Young Dastan
Gemma Arterton as Tamina, Princess of Alamut
Ben Kingsley as Prince Nizam of Persia, King Sharaman's brother
Toby Kebbell as Prince Garsiv of Persia
Alfred Molina as Sheik Amar
Richard Coyle as Prince Tus of Persia
Ronald Pickup as King Sharaman, the King of Persia and father to Dastan, Tus, and Garsiv.
Reece Ritchie as Bis, Dastan's friend
Steve Toussaint as Seso
Darwin Shaw as Asoka
Gísli Örn Garðarsson as Hassansin Leader
an adaptation of the video game of the same name developed and published by Ubisoft