The movie begins with Nobita waking up after seeing a dream where he impersonates the Stone Monkey and Doraemon a traveler from the Western dynasty. He wakes midst his friends practicing a school play. At the end, he promises to find the actual Sun Wukong in order to play his role. At home, unable to find Doraemon– who is enjoying a virtual video game– Nobita travels to 645 AD where he notices Sun Wukong resembling his face and later helping a white starving kid whom he helps. Hours later, he also brings along his friends with Doraemon after which they are prevented by an uprising cavalry. They later spot Tang Seng after which Doraemon disguises Nobita as Stone Monkey through the game. During some talks, a monster secretly cradles out of the game.
After losing his bet, Nobita and his friends return home. They find the atmosphere to be extremely dark. Everyone including their teacher develops horns, and begins to act evilly resembling monsters. Doraemon realizes that the monsters from the game came out and the course of history changed. To stop the growth and rule of monsters, the friends decide to travel back to fix things. They disguise as their respective charactersand travel back in time.
Upon reaching, the camera pans upon to Tang Seng along with the white kid, resting in a temple. After two monsters and their pets attack Tang Seng, Nobita disguised as Stone Monkey defeats them along with Doraemon and his friends. Tang Seng leaves them for his journey and the friends head forward to eliminate all monsters in Tang-Seng’s way but they get exhausted and open a camping capsule en route where they relax. At night, Tang-Seng awakes to peep the white kid whispering to a monster, but ignores and falls asleep.
The next dawn, a flock of monster-bats carry Tang-Seng towards the castle whereas the white kid leaves. Gian advises Nobita to take a look at Tang-Seng. As he moves, he passes by a past Nobita who identifies him Sun Wukong. He stops by a lake and notices the castle hosting Tang-Seng. After trying to save Tang-Seng, he is attacked by the monsters of the castle. Back at the desert, the friends help defeat Silverhorn but Shizuka is dragged by a monster underground. The white kid apologizes and leads the friends inside the castle. While reaching the main gate, the friends fall off in a hole behind the white kid. They wake up and are reunited with Shizuka and Tang-Seng but tied with ropes.
Though Tang-Seng forgives the white kid, who is actually the son of the Monstress of the Castle, the Monstress orders the King of Monsters to eat the group. However, before dipping Doraemon in acid, Dorami arrives to rescue him and the white kid releases all the friends. Nobita struggles initially, but later, magnifies his stick which pierces through the Monster King, leading to the Monstress’ death. As the volcano begins to shake, the friends take the help of Anywhere Door which directs them to a nearby beach as they watch the volcano erupt. Nobita secrets his original identity as the friends bid farewell to Tang-Seng who heads for his further journey.
Upon returning home, Nobita suspects his mother, but is relieved when he finds no horns. The friends smile as Nobita and his mother embrace. As the credits roll up, the theme song plays, while the friends happily reunite with their mothers.