In this satirical costume fantasy, a clumsy no-talent genie ends up chastised by the genie king and given one last chance to prove himself. If he fails, he will end up a mere mortal. The hapless genie then heads for Baghdad astride a talking horse to try to become the Wizard of Baghdad. In that capacity, he must ensure that a princess and prince get married so they can rule the great city together. Their union has been prophesied. Unfortunately, an elderly sultan, who will inherit the city should they fail, tries to keep the prophecy from coming true.