Sonic the Hedgehog 3 tells a story that stretches from a lab in 1974 to a weapon in orbit above Earth, and it closes with Ivo Robotnik and Shadow paying for the planet's safety with their own lives.
Once Shadow slips away from the team in Tokyo, Commander Walters fills them in on where he came from. Before long, drones sent by Ivo Robotnik strike Walters down, though he manages to give Sonic a keycard first. With Rockwell now working against them, Sonic, Tails and Knuckles join forces with Agent Stone, who has been Ivo's assistant, and follow the drones to a disused G.U.N. base.
Inside, Ivo comes face to face with his grandfather Gerald, the man who released Shadow. Gerald intends to fire the Eclipse Cannon, an orbital weapon, at G.U.N. headquarters in London, and Ivo chooses to stand beside him. Because the cannon cannot fire without two keycards, Sonic's team and their parents plan a heist to take the second. In the middle of it, Shadow severely injures Tom.
Furious, Sonic draws on the Master Emerald and transforms into Super Sonic. Shadow answers by becoming Super Shadow, and the two clash. Partway through, Sonic sees that his thirst for revenge is taking him over, and the rivals decide to shut the cannon down together.
Inside the reactor core, Gerald admits that he means to wipe out the Earth in Maria's name, and he is killed there. The beam gets redirected and cuts a slice out of the Moon. As the core fails, Ivo and Shadow give their lives to carry it away from the planet. Sonic lives, and he makes peace with the people he loves.