Following the events of Sonic 3 & Knuckles, Sonic and Tails receive a powerful energy reading from Angel Island and board their biplane, the Tornado, to investigate. However, Doctor Eggman sends an elite group of EggRobos to reach the signal before Sonic and Tails. The EggRobos excavate the source of the signal, a magical gemstone called the Phantom Ruby, just as Sonic and Tails arrive. The EggRobos gain new powers from the ruby, becoming the Hard Boiled Heavies, and send Sonic, Tails, and the island’s guardian, Knuckles, through places they have previously visited where they pursue Eggman to prevent him from using the ruby’s power for evil, clashing with him and the Heavies along the way.
Sonic and his allies discover that Eggman has used the Phantom Ruby’s power to retake control of Little Planet from Sonic CD. They board Eggman’s robotic fortress, defeat him and the Heavies, and escape just as it explodes. If all seven Chaos Emeralds are collected while playing as Sonic, the Phantom Ruby transports Sonic and Eggman to another dimension. There, the Hard Boiled Heavies’ leader, the Heavy King, betrays Eggman and takes the ruby, imbuing himself with power; Eggman attacks the Heavy to try to reclaim it. Sonic uses the Chaos Emeralds to become Super Sonic and fights Eggman and the Heavy to keep the ruby out of the possession of both. After the battle, the Phantom Ruby reacts with the Chaos Emeralds, negating Sonic’s super state and creating a wormhole that engulfs itself and Sonic as Little Planet vanishes.