In Oz: The Great and Powerful, the film prequel to the book, a woman named Annie was an old friend of Oscar Diggs (the man who would eventually become the Wizard of Oz). She visits Oscar at the circus to tell him another man, John Gale, proposed to her and Oscar tells her to accept it. This hints that Annie is and will be the mother of Dorothy.
In Return to Oz, the film sequel to the book, Dorothy has trouble going to sleep and is taken to a hospital by Aunt Em, who hopes that she can be cured of her "dreams."
The hospital treatment is electric shock threapy. Another patient is aware of this and helps Dorothy get out of her room and they escape down the hallways. Nurse Wilson attempts to catch them, but they both escape the hospital, but both fall in a river. Dorothy then falls asleep.
When Dorothy wakes up she is in Oz, and is with her pet chicken Billina and floating in a very small pond. They both swim to the shore where they find a tree with small lunch pails on it, they bring two down and they have food in them, and they begin walking into the forest.
They get to Dorothy's old house that she arrived in the first time, and notice that the Yellow Brick Road has been upturned, they walk along the road until they get to the Emerald City which has lost its color. They journey inside, where Dorothy discovers all of its citizens, including her friends the Tin Man and the Cowardly Lion, had been turned to stone, with the Scarecrow nowhere to be seen. The duo soon come across the Wheelers who then chase them. Dorothy then hides in a secret room which houses a robot, Tik-Tok. She turns him on, and he explains that he was designed to be Oz's one-man army but was shut down. With his strength, Dorothy reopens the door and Tik-Tok takes down the Wheelers, allowing them to defeat the gang. One of them directs them to Princess Mombi, who explains The Nome King had taken over the Emerald City and captured the Scarecrow. She wants Dorothy's head for her head collection. Dorothy, refusing, is locked up along with Billina in her attic. There, they meet Jack Pumpkinhead, a being who's "mother" was created to scare Mombi. Dorothy devises a plan to retrieve the Powder of Life from Mombi's head collection. This she does, but not before alerting Mombi's severed body of her escape. Rushing back to her friends, they attach the head of a Gump to a sofa that they intend to bring to life and make fly. The group narrowly escapes Mombi and head towards the Nome King's mountain.
However, the Gump falls apart, sending the group plummeting down onto the Nome King's mountain. He confronts Dorothy and tells her that the Scarecrow had been turned into an ornament for his collection. As soon as the group joins Dorothy again, the Nome King proposes that they play a game with him. If they touch the correct ornament and say the word "Oz" within three guesses, then the Scarecrow will appear and they could go free. One by one, the group goes into the collection, and fail to guess correctly. During Tik-Tok's turn, the Nome King tells Dorothy that thanks to her, the ruby slippers are now his and he can use them to send her back home, never to think of Oz again. Dorothy refuses and goes in after Tik-Tok, who lured her in by pretending to wind down as a part of his plan to see if she could see what he is changed into. His plan fails however, as he is nowhere to be found after his final guess. Dorothy then guesses twice, is able to find the Scarecrow as a green ornament. The two then rescue the others (who were green ornaments as well), but the Nome King stops the group from guessing and tries to eat them up by starting with Jack, but Billina, who was hiding in his head, lays an egg that falls into the Nome King's mouth. This kills him, leaving the ruby slippers for Dorothy to take. As the mountain collapses, she clicks her heels and wishes for all from Oz to return there safely and the Emerald City and everyone in it to be restored.
The magic of the slippers work and a celebration is thrown. The Ozians encourage Dorothy to be the Queen of Oz, but she says that she has to go back to Kansas, as it is still her real home. The understanding citizens comfort her in wishing that she could be in two places at once. But as she says this, the ruby slippers reveal the girl who helped Dorothy before in the mirror behind her. She reveals her name is Ozma, rightful ruler of Oz and promises Dorothy that should she ever need to return, she is always welcome. As she leaves, Billina decides to stay behind in Oz.
Dorothy returns home and is found by Toto, Uncle Henry, and Aunt Em who tell her that the hospital was hit by lightning and burned to the ground (with Dr. Worley in it) and Nurse Wilson was taken to jail. Returning home, Dorothy sees Ozma in her mirror with Billina. She tries to notify Aunt Em, but a hush from Ozma tells her to keep Oz a secret. She, smiling, runs outside to play with Toto as the film ends.