Jafar, the Royal Vizier of the fictional city of Agrabah, placed near the Jordan River, and his parrot Iago seek a lamp hidden within the Cave of Wonders. They are told that only one person is worthy to enter: “the diamond in the rough”, whom Jafar later identifies as Aladdin, an Agrabah street urchin. Princess Jasmine of Agrabah, upset that the law requires her to marry a prince instead of one she loves, escapes the palace and meets Aladdin and his pet monkey, Abu. The palace guards capture Aladdin on Jafar’s orders. Jasmine confronts Jafar to demand Aladdin’s release, but he lies and says that Aladdin has been executed.
Disguised as an old man, Jafar frees Aladdin and Abu and brings them to the cave, ordering them to retrieve the lamp. After being told to touch nothing but the lamp, Aladdin finds a magic carpet inside and obtains the lamp. Forgetting the cave’s rule, Abu grabs a jewel. Aladdin, Abu, and the carpet rush to escape the cave as it collapses. Aladdin gives the lamp to Jafar, who throws both Aladdin and Abu back into the cave, though not before Abu steals the lamp back. Trapped, Aladdin rubs the lamp and meets the Genie who lives inside it. The Genie grants Aladdin three wishes. Aladdin tricks the Genie into freeing them all from the cave without using a wish. He uses his first wish to assume the identity of a prince to woo Jasmine, and promises to use his third wish to free the Genie from servitude.
At Iago’s suggestion, Jafar plots to become Sultan by marrying Jasmine. Aladdin, as “Prince Ali Ababwa”, arrives in Agrabah with a large host, but Jasmine becomes angry when he discusses her fate with her father the Sultan and Jafar without her. As a means of apologizing, Aladdin takes Jasmine on a ride on the magic carpet. When she deduces his true identity, he convinces her that he only dresses as a peasant to escape the stresses of royal life. After Aladdin brings Jasmine home, the palace guards capture Aladdin on Jafar’s behest and throw him into the sea. The Genie appears and saves him at the cost of his second wish. Aladdin returns to the palace and exposes Jafar’s evil plot. Jafar flees after spotting the lamp and thus discovering Aladdin’s true identity.
Fearing that he will lose Jasmine if the truth is revealed, Aladdin breaks his promise and refuses to free the Genie. Iago steals the lamp, and Jafar becomes the Genie’s new master. He uses his first two wishes to become Sultan and the world’s most powerful sorcerer. He then exposes Aladdin’s identity and exiles him, Abu, and the carpet to a frozen wasteland. They escape and return to the palace. Jasmine tries to help Aladdin steal the lamp back, but Jafar notices and overpowers the heroes with his magic. Aladdin taunts Jafar for being less powerful than the Genie, tricking Jafar into using his last wish to become an all-powerful genie himself. Now bound to his new lamp, Jafar ends up trapped inside it, taking Iago with him.
With Agrabah returned to normal, the Genie banishes Jafar’s lamp and advises Aladdin use his third wish to regain his royal title so the law will allow him to stay with Jasmine. Aladdin decides instead to keep his promise and frees the Genie. Realizing Aladdin and Jasmine’s love, the Sultan changes the law to allow Jasmine to marry whom she chooses. The Genie leaves to explore the world, while Aladdin and Jasmine start their new life together.