South Boston teenager Jason Tripitikas is a fan of martial arts films and awakens from a dream of a battle between the Monkey King and celestial soldiers in the clouds. He visits a pawn shop in Chinatown to buy Wuxia DVDs and discovers a golden staff. On his way home, Tripitikas is harassed by some hooligans, whose leader Lupo attempts to use him to help them rob the shop-owner Hop, who is shot by Lupo. Hop tells Tripitikas to deliver the staff to its rightful owner and Tripitikas flees with the staff. He is cornered on the rooftop before being pulled off the roof by the staff.
When Tripitikas regains consciousness, he finds himself in a village in ancient China that is under attack by armored soldiers. The soldiers see his staff and attempt to seize it. He is saved by the inebriated traveling scholar Lu Yan, a supposed “immortal,” who remains alert and agile even when drunk. Lu tells him the story of the rivalry between the King and the Jade Warlord. The Warlord tricked the King into setting aside his magic staff, Ruyi Jingu Bang, and transformed the immortal into a stone statue, but the King cast his staff far away before the transformation. Lu ends the tale with a prophecy about a “Seeker” who will find the staff and free the King. Just then, they are attacked by the Warlord’s men again, but manage to escape with the help of Golden Sparrow, a young woman. She reveals that her family was murdered by the Warlord, against whom she has sworn revenge.
Meanwhile, the Warlord, upon learning about the staff, sends the witch Ni-Chang to help him retrieve it in exchange for the elixir of immortality. Tripitikas, Lu and Sparrow meet a strange man dressed in white who takes the staff away from them. Lu fights with the man (later revealed to be the Silent Monk) for the staff until the latter realizes that Tripitikas is the Seeker, and joins them in their quest to free the King. As the four travel to Five Elements Mountain, Lu and the Monk teach Tripitikas kung fu along the way. After crossing a desert, they encounter Ni-Chang and her henchmen and a battle ensues, in which Lu is mortally wounded. Tripitikas’s team takes refuge in a monastery, where they learn that Lu is actually not an immortal as he failed the test, and only the Warlord’s elixir can save his life. In desperation, Tripitikas goes to the Warlord’s palace alone to exchange the staff for the elixir.
The Warlord asks Tripitikas to duel Ni-Chang to death, since the former can give the elixir to only one of them. Tripitikas is overpowered until his teammates and monks from the monastery arrive to join the battle. Tripitikas manages to grab the elixir and tosses it to Lu, who drinks it and recovers. The Monk passes the staff to Tripitikas, who uses it to smash the King’s statue. The King is freed and the Monk is revealed to be actually one of the King’s clones. Lu kills Ni-Chang. After another long battle between the King and the Warlord, the latter is eventually stabbed by Tripitikas and falls into a lava pit to his death. However, Sparrow succumbs to her wounds. The Jade Emperor, having returned from his meditation, praises Tripitikas for fulfilling the prophecy and allows him for one wish, which he asks to return home.
Tripitikas finds himself back in the present. He overpowers Lupo and drives the other hooligans away. Hop survives from the wound and claims that he is immortal (hinting that he is actually Lu). Before the film ends, Jason is delighted to meet a woman who resembles Sparrow. Tripitikas continues honing his kung fu skills while Lu narrates the King’s search for truth.