The Babylon Rogues retrieve an Ark of the Cosmos, one of five relics capable of controlling gravity, intending to use them all to power Babylon Garden's warp engine. Other Arks fall from the sky, with one of them striking technology company MeteoTech's Crimson Tower. As a result, the robots inside go haywire and begin a global rampage. Sonic, who is traveling with Tails and Knuckles, finds one of the Arks. He is attacked by the robots, but uses the Ark's power to escape. While being pursued, the trio runs into Amy, who has also found one of the Arks. The four head to MeteoTech to investigate, where they run into the Rogues, and Storm chases after Amy in an attempt to take her Ark. The others venture further inside, where they discover the company's owner, Doctor Eggman. Eggman reveals that one of the robots, SCR-HD, was struck by the Ark that hit Crimson Tower, giving it sentience and leadership over the other robots. The robots now seek to obtain all five Arks, one of which Eggman used to power the mother computer which controls all of MeteoTech.
Amy surrenders her Ark of the Cosmos to Storm, but the two are attacked by a robot. It suddenly explodes and Storm finds another Ark inside, running off to find Jet. Eggman steals the Rogues' Arks and retreats towards the Crimson Tower, planning to use it to control all the world's robots, with the Rogues in pursuit. Sonic and the others retrieve Amy and travel to Crimson Tower to shut down the mother computer. They meet the Rogues there, and Jet challenges Sonic to one last race, with the winner getting all the Arks. The two storm the tower and take back the Arks, shutting down all the robots. The Arks' resonance calls down the Babylon Garden, and Sonic hands his Arks over to Jet.
Before they can leave, SCR-HD appears and steals the Arks of the Cosmos, retreating to Babylon Garden. SCR-HD activates the Arks, revealing an ancient spaceship inside Babylon Garden, creating a massive black hole capable of destroying the planet and transforming into a monstrous robot named Master Core ABIS. Eggman escapes while the heroes and Rogues head for the ship and defeat ABIS with Gravity Dives, shutting down the Arks and stopping the black hole, leaving the ship adrift in orbit. In the aftermath, Tails speculates that the Babylonians' ancestors were aliens who lost control of their ship, releasing the Arks into orbit to shut it down before crash landing, hoping the Arks would one day return to the surface so they could return to their home planet. Jet arrives and challenges Sonic, who happily accepts.