People from near and far are arrive in Agrabah to celebrate the wedding of Aladdin and Princess Jasmine. However, the Sultan cannot find Aladdin during the preparations—he has returned to his old hovel to recover a dagger, his only memento of his lost father, who had died in Aladdin’s early childhood. Aladdin reveals to Genie that he is worried as to what kind of father he will be since his father was absent, but Genie reassures him and they head to the palace for the wedding. Meanwhile, unknown to the guests or guards, the legendary Forty Thieves and their leader, the King of Thieves, have sneaked into Agrabah to raid the wedding. The ceremony begins as planned and Aladdin and Jasmine are about to say their vows, but the Forty Thieves soon interrupt and steal treasures from all the guests. While Jasmine, Abu, Carpet and Genie fight off the thieves, Aladdin faces the King of Thieves, who is trying to steal a specific scepter from among the wedding gifts.
The Forty Thieves and their leader soon escape without the scepter. Aladdin, Jasmine and company soon discover that this is no ordinary gift; it contains a powerful Oracle who has the power to answer a single question about absolutely anything for each individual. When Iago accidentally asks her why the thieves want the staff so badly, she says that they were looking for the “ultimate treasure”. Learning of the Oracle’s power, Aladdin becomes curious about his past. She hints to him that those questions can be answered by his father, who is still alive, much to Aladdin’s shock.
Later on, Aladdin is at his hovel reflecting over his father’s survival. He wonders if he should seek the man who left him as a child, and decides with Jasmine’s encouragement to track him down. Aladdin asks the oracle about his father’s whereabouts; the oracle reveals that his father is with the Forty Thieves, “trapped within their world.”
Aladdin, Abu, Iago and the Carpet track the Thieves down and infiltrate their hideout, Mount Sesame, where the band discovers that Aladdin’s father is Cassim, King of the Forty Thieves. Though Aladdin shares a brief, heartfelt reunion with Cassim, Cassim’s subordinate Sa’luk (Jerry Orbach) tries to punish Aladdin for entering the hideout. Cassim, instead suggests that Aladdin instead face “the Challenge”—an initiation ritual—where he must defeat another one of the Forty Thieves and take his place. Sa’luk fights Aladdin, but the latter manages to prevail by throwing his opponent off a cliff into the sea. Aladdin is welcomed into the band, and Cassim reveals to Aladdin why he had left his wife and son: to find the Hand of Midas, a powerful artifact that can transform anything it touches into gold. Cassim believed that, with the Hand, he could return to his family and give them the life they deserved instead of one living out in the streets, and had instigated the raid so he could capture the oracle’s staff and question the seer as to the precise whereabouts of the artifact. Aladdin convinces Cassim to return with him to Agrabah to live an honest life. Initially reluctant, Cassim eventually agrees when Iago inadvertently reveals that Aladdin’s wedding may be his final chance to get the Oracle.
For a while, Cassim is happy to spend quality time with his son. Cassim meets with Genie, Jasmine and the Sultan, and they immediately take a liking to Aladdin’s father. Cassim decides to carry on his original scheme with Iago as his new henchman. Meanwhile, Sa’luk makes his way to Agrabah. He reveals himself to Razoul and sells out his fellow thieves by telling Razoul the password to their hideout in exchange for immunity from prosecution. After thirty-one of the thieves are captured, Sa’luk and Razoul are told by one of the guards that the Sultan won’t be able to sentence them until after the wedding. Sa’luk then tells them that Aladdin is one of the forty, and his father Cassim is the King himself. While attempting to steal the Oracle from the palace treasure chamber, Cassim and Iago are captured by the royal guards and Razoul reveals to the Sultan that Cassim is the King of Thieves. The Sultan has Razoul detain Cassim and Iago in the dungeon for life. Aladdin frees Cassim, but is discovered by Razoul. Despite being a criminal, Aladdin returns to the palace to take responsibility for his actions. The Sultan prepares to punish Aladdin, but Genie and Jasmine come to his defense, stating that all he wanted was to give his father a second chance. The Sultan accepts his apology, much to Razoul’s dismay.
With the oracle in hand, Cassim and Iago return to Mount Sesame, only to be captured by Sa’luk and the remaining seven thieves. Cassim is forced to use the stolen oracle in order to find the location of the Hand of Midas and then lead his men there. The Oracle directs them to The Vanishing Isle, a great marble fortress built on the back of a gigantic undersea turtle that periodically dives to the bottom of the ocean, where the Hand is hidden. Iago flees from the group, and goes off to lead Aladdin, Jasmine, Abu and Carpet to the imprisoned Cassim. Aladdin manages to free and reconcile with his father. Working together, they retrieve the Hand just as the turtle is beginning to submerge, but they are attacked by Sa’luk.
While trying to flee from the flood, Sa’luk takes Aladdin hostage, demanding that Cassim surrender the Hand. Cassim throws the Hand of Midas to Sa’luk, who catches it by the Golden Hand itself (instead of the bronze handle) and is thus transformed into a golden statue that falls into the sea below. Aladdin’s band flees. Realizing that his obsession with the Hand can cause destruction and his son is actually his ultimate treasure, Cassim discards the Hand. It lands on the ship with the remaining thieves aboard, turning it into gold and sinking it. Everyone goes back to Agrabah where Aladdin and Jasmine finally get married at a ceremony that features cameo appearances of characters from the animated series. Cassim attends in the shadows, as he is still wanted for his crimes. Iago decides to join Cassim as a traveling companion, and they go off once again to see the world.