Dr. Eggman, apparently trying to mend his reputation, opens Dr. Eggman's Interstellar Amusement Park in space — a collection of planet-sized attractions. Sonic and Tails go to investigate and run into Yacker, a member of an alien species called the Wisps.
Communication established, the truth comes out: Eggman has been kidnapping Wisps to harvest their Hyper-Go-On life energy. Worse, he is converting them into Nega-Wisps to fuel a mind-control beam aimed at Sonic's home world.
Sonic works his way through the park's planets, freeing Wisps and shutting down the generators that link them to the attraction. When Eggman tries to fire the cannon, debris from an earlier boss fight knocks it out of alignment. As the park begins to break apart, Sonic sends Tails down the space elevator and stays behind to face Eggman's final machine, and with the Wisps' help he wins and makes it home.
The DS version adds a twist: the Mother Wisp has been corrupted by the negative energy, so Sonic goes Super Sonic to defeat and purify her.