Rayman 2 takes place in a world called the Glade of Dreams. An army of Robot Pirates, led by Admiral Razorbeard, invades this world and destroys the Heart of the World, the world core. This greatly weakens the resistance's power and disables Rayman's powers, leading to his capture.
Globox, a friend of Rayman, is later also captured and put in the same cell as Rayman aboard the Pirates' prison ship. Globox gives Rayman a silver lum given to him by Ly the fairy, which restores his powers. Rayman escapes the prison ship, and is separated from Globox again. He learns that to stand a chance against the Pirates, he needs to find four ancient magic masks to awaken Polokus, the spirit of the world, hidden in secret and mysterious sanctuaries consisting of the four elements water/ice, earth/stone, fire, and air. He travels through the Glade of Dreams via the Hall of Doors, a magical place linked to various locations in the world, controlled by the ancient Teensies.
In the course of the game, Rayman frees Globox who had been captured again, and they continue together for a short while until Globox departs again to go find his family. Later, Rayman finds Globox's wife Uglette and learns that he has been imprisoned on the Prison Ship. Rayman also encounters his friend Clark, a strongman who has stomach problems due to eating rusty pirates; to continue through the level, Rayman has to cure Clark by means of an elixir.
Eventually, Rayman recovers the four masks and awakens Polokus, who makes quick work of the pirates on land. In the air however, he has no power, and Rayman is tasked to dispose of the Pirates' flying Prison Ship, where Admiral Razorbeard also has his headquarters. In a final battle Rayman fights Razorbeard, who is controlling a giant robot, the Grolgoth. Eventually Rayman destroys the robot and while Razorbeard escapes in a small escape pod, the Prison Ship explodes. Rayman is presumed dead and only one of his shoes is found, but during his funeral, he appears again, walking on a crutch.