Sonic Unleashed begins with a cold open that sees Sonic confronting his nemesis, Doctor Eggman, bounding around a fleet of spaceships. After the defeat of several of his robots, Sonic transforms into Super Sonic. After a brief chase through the airships, Sonic corners Eggman. However, Eggman manages to trap him using a powerful new ray weapon which drains the power of the Chaos Emeralds, causing them to turn gray and useless. He then uses the Emeralds' energy to fire an enormous laser and unleash a powerful beast, Dark Gaia, from the center of the planet, which has devastating consequences, shattering the planet into pieces. In addition, the ray and drained Chaos Emeralds have the unforeseen side-effect of transforming Sonic into a "Werehog" — a beast form with greater strength and abilities — at night. Eggman then ejects Sonic into space, who then lands safely onto the planet below. After landing along with the Emeralds, Sonic encounters a friendly creature who appears to suffer amnesia. Assuming he has caused it with his fall, Sonic decides to assist him in his quest to find out who he is, and the creature becomes a guide for the player; Sonic soon gives him the nickname Chip. Sonic's quest begins, and with the help of some old friends, such as Amy and Tails, he attempts to solve the crisis by traveling the world's continents, finding shrines that will fix the Emeralds, in order to return the world, and himself, to normal.
After six of the seven continents are returned to normal, Chip is able to regain his memory; he is in fact Dark Gaia's opposite, Light Gaia. For millions of years, the two of them had been in a cycle since the beginning of time where Dark Gaia would break the planet apart, and Light Gaia would put it back together. Chip was released along with Dark Gaia, but because both of them were released prematurely, he lost his memory, and Dark Gaia was broken apart. They are able to place the last Chaos Emerald in the shrine on the final continent at Eggman's new empire, "Eggmanland", but are interrupted by him; Sonic then defeats Eggman who is using a robot that utilizes Dark Gaia's power. During the battle, the three sink into the core of the Earth and encounter Dark Gaia. Eggman orders a now-whole Dark Gaia to destroy Sonic, but it turns on him, knocking him away with one of its tentacles, and absorbs the power that turned Sonic into a Werehog, curing Sonic of the lycanthropy. and uses that power to become Semi-Perfect Dark Gaia. Dark Gaia then attacks a defenseless Sonic and Chip, but Chip protects them both and calls all of the Gaia temples together and forms the Gaia Colossus, and begins to fight Dark Gaia. The Gaia Colussus seemingly defeats Dark Gaia, but Dark Gaia is not finished with them or the Earth yet, and consumes the entire world in darkness, becoming Perfect Dark Gaia in the process. Chip then gives the restored Chaos Emeralds to Sonic, allowing him to turn into Super Sonic and defeat it; Dark Gaia then sinks back into the planet, but the battle takes its toll on Super Sonic. Chip saves an exhausted Sonic by throwing him to the surface, before returning himself to the inside of the planet; he leaves behind his necklace and some parting words, and Sonic places the necklace on his hand as a bracelet to remind him of their adventure together. The game ends as Sonic speeds off with Tails, who flies alongside him on the coastline in the Tornado plane.