In ancient Bagdad, the young prince Ahmad (John Justin) is betrayed, deposed, and imprisoned by his vizier Jaffar (Conrad Veidt), an evil and calculating man who is also a master of the Black Arts. But Ahmad is saved from prison, and certain execution, by Abu (Sabu), a young thief who has made his way in life by stealing whatever he needs. Together they escape from Bagdad and make their way to the port city of Basra, where they hope to sign to sail with the renowned sailor Sinbad. But Ahmad chances to catch a glimpse of the daughter (June Duprez) of the Sultan (Miles Malleson, who also co-wrote the screenplay), and falls hopelessly in love with her. Sneaking into the garden where she spends most of her days, she meets him and the two are bound together forever in that moment, he the first man she has ever seen, and she the most beautiful woman he has ever beheld. But no sooner have they declared their love for each other then Jaffar arrives in Basra, seeking the princess' hand in marriage -- and to secure the blessing of her father, a fanatical collector of toys, he offers the aging Sultan a fantastic mechanical flying horse that bears him into the clouds at will. The sultan agrees to the marriage, but the princess flees the city. Abu and Ahmad are captured and before either can tell the sultan of their plight, Jaffar works his magic, leaving Ahmad blind and transforming Abu into a dog -- conditions that will remain until he holds the princess in his arms. Everything in the movie up to this point has been told in flashback, by Ahmad, as he is lured to the palace of his enemy. Jaffar has captured the princess, but she has fallen into a deep sleep that will not end -- so his doctors assure him -- until she is reunited with Ahmad. He achieves this goal, and the princess awakens, only to be parted from Ahmad again by Jaffar, who sails for Basra with her as his prisoner. But she won't love him, and the kind of love he wants from her can only be given by her, not taken by him. When Ahmad and Abu -- now restored by Jaffar's regaining the princess -- try to follow him, he calls up a storm that sweeps them from the sea. Abu finds himself on a beach alone, and while searching for Ahmad he finds a strange bottle, which he opens, and out comes a real genie (Rex Ingram), hundreds of feet tall. The genie means to kill him, but Abu outwits the genie and secures from him three wishes. Abu must find Ahmad, but to do that he must go to the Palace of the Goddess of Night, half a world away, and steal the All-Seeing Eye. Abu does this, getting past guards, both human and monstrous, and from there it is on to Ahmad. But a misunderstanding between them leaves the two friends separated, Ahmad captured by Jaffar and sentenced -- along with the princess, who will not love Jaffar -- to death. Meanwhile, Abu is stranded countless miles away. And then one desperate act by the boy suddenly sends Abu into a magical, golden kingdom, the Land of Legend, where he is greeted as their new king. The old king (Morton Selten) shows him the symbols of his rule, which include magical arrows forged to destroy injustice. Abu still must save his friend, and to do it commits one last act of theft -- but can he arrive in time?