The story of Aladdin is an old Arabic story, with unknown origins. Its first appearance in print was in The Book of One Thousand and One Nights – a compendium of Arabic, Persian and Indian myths and legends, and the same book that gave us Ali Baba and Sinbad. The name ‘Aladdin’ is actually ‘Ala ad-Din’, and the story probably came from Syria.
The version of Aladdin that was written down in 1709 is largely the one that we know today, although there are a few key differences. Aladdin, a poor young man, is sent by a sorcerer to get a magic lamp from a cave – but isn’t told that it’s protected by a curse. Angry at the lie, Aladdin keeps the lamp, and finds that a genie lives inside who can grant him wishes. He uses this power selfishly, to become rich and marry a princess, but his new wife, not knowing the lamp’s power, gives it away to the sorcerer.
When the sorcerer uses his new power to take Aladdin’s wife and riches, Aladdin is reduced to nothing. However, he still has a ring that the sorcerer gave him before he went in the cave, and the ring is capable of summoning another, less powerful genie. With this new genie’s help, Aladdin defeats the sorcerer.
As you can see, the start is familiar, but the ending is probably quite different to what you’ve heard. There are other elements that are left out entirely from modern re-tellings – Aladdin is cheated by a Jew and then helped by a Muslim at one point, for example, which is now seen as incredibly anti-semitic.
Regardless, the overall meaning of the story is clear. When Aladdin uses the lamp to get riches and marry the princess for the first time, he has not truly earned them. It is only once he has been through a struggle and proven his worth that he can be entitled to his new position.