Josh, a 12-year old son of a divorced couple, is presenting his incomplete school paper about a historic event he was tasked to write about. The unamused teacher warns Josh to finish his paper by tomorrow or face being referred to by his parents. After school, Josh goes home to an apartment owned by his father, Hal, an unemployed computer scientist who is doing research for his grand invention, a supercomputer called the XRI (eXtremely Radical Intelligence) that possesses artificial intelligence with the ability to project virtual reality. After dinner, Hal leaves to gather research on a piece of hardware, leaving Josh with the XRI. A curious Josh encounters the XRI and, after being unable to get it to help finish his school work, hooks up his Sega Saturn to play Sonic X-treme.
At that moment, Sonic, the game's main character, discovers he has a will of his own and stops responding to Josh's controls. Josh manages to hack into the computer to bring Sonic out of the video game, becoming a 3D character capable of interacting with reality. Josh and Sonic form a bond with each other, but Sonic's departure from Sonic X-treme causes him to lose his power as time goes on and he ends up causing trouble throughout the real world, destroying Josh's apartment and causing car wrecks throughout the city. Meanwhile, Dr. Eggman (identified in the treatment through his real name, Dr. Robotnik) and his minions inadvertently escape the game and look to take over the real world, and Sonic is unable to stop him due to his draining powers.
When Hal comes home to see his apartment in ruins, Josh's mother, Lisa, also stops by and the two start to argue. Josh attempts to explain what happened but neither believe him, with both blaming him for the mess. Josh is then taken out of Hal's custody to Lisa's home, where Sonic tracks him down. After leaving the house without Lisa noticing, Josh and Sonic devise a plot to find out about and stop Eggman's scheme by searching for Chaos Emeralds, which are scattered across the real world encased in ordinary rocks. After finding a Chaos Emerald, Sonic uses its power to temporarily regain his strength, and Sonic gives Josh a taste of the power of the emerald to help finish his school work, though Sonic warns Josh not to further exploit the emerald's power until he can master it. At the same time, Dr. Eggman sets up a shell corporation called Shady Corporation and uses it to purchase the abandoned Ramshackle Amusement Park, renaming it Botnikland Amusement Park. He recruits a group of school bullies and roboticizes them into Bullibots. Eggman orders the bots to look around the park and find the remaining Chaos Emeralds.
Eggman then runs into Hal, who reluctantly accepts Eggman's offer to be the park's main research and development designer. Using Hal's XRI technology, Eggman develops a virtual reality ride to draw kids to the newly revived theme park. The park opens to huge crowds, with kids all across town attending opening day. However, when Josh and Sonic manage to inspect the ride, they discover Eggman is using the ride to turn the kids into his Badniks, calling them Kinder-Bots and forcing them to look around the park to find the Chaos Emeralds. After further inspection, the duo discover that Eggman, using the Chaos Emeralds, will program the XRI to turn the world's natural landmarks, such as Mount Everest and the Amazon rainforest, into digital replicas so that he can make virtual reality experiences and profit off of people wanting to see them, so that they wouldn't have to visit the landmarks themselves. The BulliBots catch the duo and a chase ensues, ending with a weak Sonic being captured and Josh barely escaping.
After the chase, the Kinder-Bots return home, being unconditionally obedient to their parents. Josh hatches a plan to return everything back to normal and return Dr. Eggman back into the game world. The climax has Josh rescue Sonic and the duo battle Dr. Eggman before Josh activates the XRI and causes himself, Sonic, Dr. Eggman and the Badniks to enter Sonic X-treme. Another battle ensues, with a newly rejuvenated Sonic eventually defeating Dr. Eggman with Josh's help. With Eggman's plans foiled, he vows to return and escapes. Sonic decides to stay in his world knowing that it needs him to stop Eggman's schemes, and bids Josh farewell before the latter returns home and reunites with Hal and Lisa. The film ends with Josh promising Hal to remove the XRI, until he sees Sonic's eye wink at him at the screen and starts playing Sonic X-treme again.
Sega first came up with the idea of a feature-length Sonic the Hedgehog film during production of the cartoon in 1993. Newly-appointed consumer products director Michealene Risley, who was instrumental in green-lighting the series, was assigned to negotiate with several Hollywood producers to find support for the project. “I was basically driving the Sonic movie," Risley recalled to Kotaku in 2018. "I don’t know who came up with the idea – whether it was Tom [Kalinske, Sega of America CEO] or Shinobu [Toyoda, Sega executive vice-president and COO] or me, or we talked about it as a group – but having come from the movie world, I was always pushing those things." Tom Kalinske, however, was hesitant on the idea of a movie, recalling how 1987's Masters of the Universe damaged the namesake toy-line and how the critical and commercial failures of Super Mario Bros. and Street Fighter stained the reputation of their namesake video game franchises. Kalinske noted to Kotaku that "There is really is that fear that a bad movie could potentially hurt your brand. The Sonic brand was strong enough to probably withstand it, but there is that fear." Despite Kalinske's concerns, Sega was highly enthusiastic about the project, according to Risley. "It all depends on the timing of the movie, the look of the movie, whether you go live action or animation. [The film failing] was never an issue for us." After about a year of negotiations, Sega struck a development deal in August 1994 with MGM and Trilogy Entertainment Group, led by producer Pen Densham, with Densham serving as executive producer of the planned movie.
After securing the deal, Sega and MGM tapped Richard Jefferies to help come up with a screenplay for the film. Jefferies had previously written the cult classic The Vagrant for MGM in 1992, and had worked with Risley during her time at Marvel Comics to help write a proposed film adaptation of the Silver Surfer character. According to Jefferies, Sega wanted the ill-fated Sonic X-treme game, which was in development for the then-unreleased Sega Saturn, to tie-in with the movie, adding that Sega was "trying to co-ordinate the two and make the two compatible." Sonic would have also been portrayed through heavy use of computer-generated imagery. Jefferies' treatment contains a number of references to the franchise's games, with a notable example being Josh's school assignment. In it, he writes about a World War II test pilot named Sonic, who was killed in a freak accident when he tried to break the sound barrier. This is a reference to the technical files of the first game that provided Sonic the Hedgehog's original backstory.
Jefferies' treatment was submitted to MGM in May 1995. According to Jeffries, the draft received a positive reception among Sega and MGM executives, but Shinobu Toyoda sent a letter to Kalinske suggesting that Doctor Eggman be removed from the script, favoring a "strong/mean villain" to give the series a fresh idea.
Before the project could be green-lit, MGM suddenly backed out of the development deal, and after an attempt to revive the film at DreamWorks went nowhere, the film was scrapped. It is unclear why MGM chose to drop the film from their slate, though Pen Densham claimed the deal broke down due to creative differences between Sega and Trilogy, causing the latter to pull out and leave MGM with the bill. Jeffries, however, blamed "Hollywood politics" for the film's demise, believing that the studios each wanted a higher share of the film's profits. He also suggested that the character had trouble adapting to the decline of the 16-bit console market. "The focus groups weren’t responding to the evolution of the character," Jeffries remarked, "and the heyday of the character was behind them. Maybe they were hoping a movie could help reinvigorate that. But maybe it was a response to where Sonic was headed, and maybe MGM came to that conclusion themselves. I don’t know." Jeffries speculated that the film's budget would've reached around $150 million, making it MGM's most expensive film to date, and suggested that the financial concerns were another reason for MGM abandoning the film.