Fifty-one years ago, Maria and her grandfather Gerald were living happily on the Space Colony ARK. Gerald decided to start Project Shadow to create the "ultimate species" to protect the universe. Gerald attempted to create the first of the species, but they all failed. His future grandson then accidentally sent a blue hair sample to him using a time machine.
Gerald then put the blue hair sample in his cloning machine. Its form turned out to be a hedgehog, but Maria instantly became its best friend. One year later, the FBI decides to destroy Space Colony ARK, and they infiltrate it. Once finding out about Project Shadow, they arrest Gerald, who tells Maria and Shadow to go to the Escape Pod. However, Maria isn't fast enough, and she tells Shadow to be kind and help people on Earth. After she pulls the lever, she is immediately shot. Once Shadow reaches Earth, he falls into a deep sleep and forgets everything he knew.
In the present, Sonic and the Freedom Fighters (Sally, Big, Tails, Knuckles, Espio, Rabbot and Amy) try to defeat a bunch of Eggman's robots. Sonic then notices a truck heading for the city that has spikes in front of it and is going at a really fast speed. Sonic runs up to it, and the truck tries to crush Sonic. He tries to outrun the truck, but he and the truck are sent back by an extremely powerful wind after hearing somebody yell, "Chaos Control!"
Sonic tries to discover who did this, and soon discovers a black hedgehog holding a Chaos Emerald. Sonic asks for the Chaos Emerald, but the hedgehog denies. Sonic punches him, but the hedgehog yells Chaos Control and teleports behind Sonic and punches him. The hedgehog says, "Do not mess with Shadow." It then yells Chaos Control again, and disappears.
While Sonic heads back to the Freedom Fighters, he runs into Eggman. He asks Eggman about Shadow, but he knows nothing about it. Eggman and Sonic agree that they should temporarily truce and defeat Shadow. When they get back to share the news, Tails says that Knuckles said that he felt that a Chaos Emerald had been broken.
Meanwhile, Knuckles walks into a pyramid where he believes the broken Chaos Emerald to be. Rouge, a bat, flies down and says that her boss told her to get a Chaos Emerald. She says she will not hurt Knuckles if he lets her get the Chaos Emerald, but Knuckles tells her that he is also looking for the Chaos Emerald. They decide to have a race to see who can find it first.
They both find a half of the Chaos Emerald, and do not want to combine them, in fear that the other would take it. Rouge then pulls out another Chaos Emerald, yelling "Chaos Control!" and teleports behind Knuckles. She then takes the other half of the Chaos Emerald and flies away. Knuckles runs back to the other Freedom Fighters.
After hearing the news that a bat is trying to steal Chaos Emeralds, Rabbot, Big, and Sally suspect that Shadow is her boss, and they are trying to find the Chaos Emeralds. Sonic then realizes that Espio's powers are somewhat similar to Shadow's. He asks Espio if he can borrow his ring. Espio denies, but says that he will help Sonic defeat Shadow.
Meanwhile, Shadow and Rouge are at the abandoned Sky Sanctuary, where they have all the eight Chaos Emeralds. Dr. Gerald Robotnik anonymously calls Shadow and tells him about what happened to him in the past. Shadow then decides to get vengeance on the FBI for what happened fifty years earlier.
Shadow breaks into the FBI Headquarters and starts fighting everyone. On television, it says that Sonic had turned evil and was viciously attacking the FBI. The Freedom Fighters do not believe this as Sonic is with them, so they go to defeat Shadow. Shadow eventually runs away, realizing the Freedom Fighters are his only threat.
Shadow goes to the city with the Chaos Emeralds, and they fly around him. Sonic and the Freedom Fighters arrive at the scene too late. Shadow becomes Super Shadow, who then flies up to the Space Colony ARK. Eggman's prototype of a rocket arrives and takes the Freedom Fighters to space, where they follow Shadow to the Space Colony.
After reaching the Space Colony ARK, which Shadow thought was destroyed, Shadow opens a door that unleashes the Biolizard, which was apparently one of the first prototypes of the Ultimate Life Form. Shadow tells the Biolizard to attack the Freedom Fighters, but it instead attacks Shadow. The Freedom Fighters try to get out of the rocket prototype, but the doors are locked.
The Biolizard eats the Chaos Emeralds and evolves into Finalhazard. His tail hits the door of the rocket, and Sonic falls out. Finalhazard then hits it again, trapping everybody else inside. Sonic hits Finalhazard, who spits out the Chaos Emeralds. Sonic uses them to transform into Super Sonic. Shadow tells Sonic he can defeat Finalhazard by himself, but Sonic disagrees as Finalhazard is also using Chaos Energy.
Finalhazard then merges with a device called the Eclipse Cannon that Gerald had been working on, making him become the Space Colony ARK. Due to both the machinery in the Space Colony and the Chaos Energy, this creates large, red boils on his skin. Sonic and Shadow decide to attack the boils to see what would happen. It seems to harm Finalhazard, so they keep attacking the red boils.
After Finalhazard is defeated, Sonic breaks open the rocket door. However, Shadow's Chaos Energy wears off as he is flying in space, sending him hurdling down to Earth. Sonic dives after him, but is not fast enough. Shadow then hits the ground, saying his final words: "Maria, this is what you wanted, right? This is my promise I made to you." Sonic returns to the Space Colony ARK, where his Chaos Energy wears off. Rouge asks where Shadow is, but Sonic looks down and does not reply.
A few hours later, Eggman puts Shadow's body in a capsule. The Freedom Fighters and Eggman leave, but Rouge stays. Rouge then puts a green Chaos Emerald, the one that Shadow was holding earlier in the movie, on top of the capsule in a slot shaped like a Chaos Emerald, and leaves.
In a mid-credits scene, a lightning bolt flashes and a robot that looks like Sonic is revealed.
In another mid-credits scene, a green bird flies past the screen on a hover board.
In a post-credits scene, Shadow, who is inside of the capsule, opens his eyes while Rouge says, "Wake up, Shadow."
- Jason Griffith as Sonic the Hedgehog and Shadow the Hedgehog
- Conner Bringas as Tails the Fox and Maria Robotnik
- Scott Drier as Knuckles the Echidna
- Jennifer Douillard as Amy Rose
- Deem Bristow as Dr. Robotnik and Dr. Gerald Robotnik
- John St. John as Big the Cat
- Kathleen Delaney as Sally Acorn
- Tim Allen as Espio the Chameleon
- Christine Cavanaugh as Rabbot
- Sean Schemmel as Biolizard
- Caren Manuel as Rouge
- Clark Gregg as FBI Agent #1
- Keith David as FBI Agent #2