The movie's plot is a combination of L. Frank Baum's novels Ozma of Oz and The Marvelous Land of Oz, written as sequels to the original novel The Wonderful Wizard of Oz. Dorothy (played by Fairuza Balk) cannot stop thinking about the Land of Oz and her friends the Scarecrow, the Tin Woodman and the Cowardly Lion. Her worried aunt takes her to a doctor who wishes to "cure" Dorothy of her dreams and delusions with something like electro-shock therapy, but Dorothy escapes during a storm with a hen called Billina. She returns to Oz only to find it in a post-apocalyptic state: the yellow brick road is desecrated, the Emerald City is a collapsing ruin, all its inhabitants, including the Tin Woodman and the Cowardly Lion have been turned to stone, and the Scarecrow has been kidnapped by the Nome King. She is soon imprisoned by the wicked Princess Mombi (a composite of two characters from the books, Princess Langwidere and the witch Mombi).

After meeting a mechanical man named Tik-Tok and a talking dummy named Jack Pumpkinhead, Dorothy discovers that her friends have been turned to stone by the evil Nome King, who is planning to conquer all of Oz. They build a flying Gump to escape Mombi's castle, and fly to the country of the Nome King to find the Scarecrow, who is the king of the Emerald City. The Nome King reveals that he has transformed the Scarecrow into an ornament, and allows each of them to enter his huge room of ornaments and have three guesses as to which one is the Scarecrow. All they have to do is place their hand on an ornament and say the word 'Oz'. However, failure to find the Scarecrow results in the Gump, Tik-Tok, Jack Pumpkinhead and Billina becoming ornaments themselves. Luckily, Dorothy finds the Scarecrow, realizing in the process that the Nome King has enchanted them all into objects colored green. With this information, Dorothy and the Scarecrow manage to rescue their friends. The Nome King is destroyed when he inadvertently swallows one of Billina's eggs (in Oz, eggs are poisonous to nomes), leaving behind the ruby slippers Dorothy lost while returning from her first visit to Oz. Using these, Dorothy wishes herself and her friends back to a restored Emerald City. She discovers the girl Ozma who is the rightful ruler to the Emerald City, trapped in a mirror by Princess Mombi. After a joyous celebration, Dorothy is returned home.