Summary
- Infinite uses the Phantom Ruby to overpower Sonic, leading to his imprisonment.
- Lyric ambushes Sonic and buries him under rubble in Sonic Boom: Rise of Lyric.
- Mephiles kills Sonic in Sonic the Hedgehog 2006, requiring teamwork to defeat him.
The Blue Blur, Sonic the Hedgehog, is a protagonist who rarely fails in his mission to save the world from the next group of villains he is tasked with defeating. However, there were still some antagonists who managed to get the better of Sonic and ultimately ended up beating him.

Related
Sonic The Hedgehog: 8 Scariest Characters, Ranked
The Sonic franchise isn't all that scary, at least, not until these creepy characters appear.
While in most cases, Sonic is able to bounce back from these defeats to defeat the villain once and for all, doing so can be difficult when he already has a chip on his shoulder from the last encounter. Nonetheless, it definitely adds a lot of intrigue to a game's story when the protagonist suffers defeat, and in the case of Sonic games, these villains below are the ones who managed to defeat everyone's favorite blue hedgehog.
6 Infinity (Sound Forces)
Infinite uses the power of the Phantom Ruby to overpower Sonic effortlessly
Sonic forces' The story begins with a bang, as the world descends into chaos after Eggman teams up with a mysterious new villain known only as Infinity. Not one to sit back and watch the world burn, Sonic rushes to the scene, only to be met by Infinite, who possesses the power of the Phantom Ruby, allowing his power to far surpass Sonic's.
Despite trying to resist his powers, Sonic ultimately succumbs to Infinite's strength and is even imprisoned in the Death Egg after being knocked down, leaving him absent for about half the game. Considering this Sonic forces it was a game that emphasized players creating their own character and becoming part of the story, removing Sonic for a while made sense, but it was still surprising to see him defeated so quickly.
5 Lyrics (Sonic Boom: Rise Of Lyric)
Lyric catches Sonic off guard and buries him under a pile of rubble
Lyric is a rattlesnake-like creature that is revealed at the beginning of Sonic Boom: The Rise of Lyrics being the last surviving member of a mysterious group known as the Ancients. Being part of this clan makes Lyric incredibly powerful, and towards the middle of the game, he and his henchmen manage to ambush Sonic and his friends, demanding them to hand over the Chaos Crystals.

Related
Sonic The Hedgehog: the 7 most introverted characters
While Blue Blur himself is known for being an extrovert, these more introverted characters couldn't be more different.
While Knuckles, Amy, and Tails all agree to do so out of fear, Sonic is the only one who stands his ground. This ends in disaster however, as Sonic is then hit by a barrage of energy weapons and buried under a few meters of rubble, being completely humiliated in the process. Even though he manages to get back on his feet and make amends with the gang, this was a bitter loss for Sonic to bear and one he kept in the back of his mind for the rest of the story.
4 Merlina (Sonic and the Black Knight)
Sonic's attempt to face the Dark Queen alone ends in failure
Merlina is an omnipotent being who acts as Sonic's antagonist for much of the game The Black Knightand while Sonic figures he has a chance to take her down, in the end he doesn't even manage to land a single blow. After Merlina transforms into the Dark Queen, Sonic attempts to defeat her alone in an act of desperation, only to be blown away and severely injured by the mysterious entity.
Ultimately, it is only thanks to the support of his friends and the rebirth of Excalibur that Sonic possesses enough power to defeat Merlina once and for all. This battle is an example of how Sonic's impulsive and impetuous personality can often get him into trouble, especially when facing formidable enemies that he has little knowledge of.
3 Doctor Robotnik (Sonic CD)
Sonic CD's bad ending sees Eggman use the Time Stones to render Sonic's efforts futile
Although Robotnik is essentially the same character as Eggman, since he is often referred to as “classic” Eggman, similar to how Classic and Modern Sonic are usually separated, his feats can be counted here. Robotnik's most notable triumph over Sonic comes at the end Sonic CD as part of the bad ending, which players can acquire by failing to collect all the Time Stones by the end.

Related
8 Sonic The Hedgehog Games With the Best Graphics (For Their Era)
These Sonic the Hedgehog games provide a visually pleasing experience even today.
In this ending, despite everything Sonic did to save Amy and defeat Metal Sonic, Robotnik reveals the Time Stones in his hand, which he then uses to bring Little Planet back and proceed with his plan, frustrating Sonic's efforts. While it's a clever way to incentivize players to come back for a second playthrough, it's also a pretty miserable defeat for Sonic, who is forced to do everything again to save Amy and the world at large.
2 Mephiles (Sonic The Hedgehog 2006)
The Almighty manages to kill Sonic to activate his master plan
Believe it or not, there was a time when Sonic was actually killed in a game and his death came at the hands of Mephiles. Mephiles' goal was to force Princess Elise, who up until that point had formed a strong bond with the blue hedgehog, to shed a tear and release her seal on Iblis, allowing Mephiles to transform into the all-powerful Solaris.
Mephiles is undoubtedly one of the most powerful and intimidating villains in the entire series, so much so that not even Sonic was able to defeat him on the first try. In fact, even at the end of the game, it takes Sonic, Shadow, and Silver working in tandem to finally defeat Solaris, proving that Mephiles alone was simply too much for Sonic to handle on his own.
1 Doctor Eggman (Sonic Unleashed)
Eggman manages to trap Sonic and leak his chaos energy into the intro of Unleashed
Dr. Eggman, Sonic's arch-rival who appears in most of the games in the series, is usually the one to suffer defeat, but Sonic unleashed was one of the few exceptions to this trend. During the introductory cutscene, Sonic lands on an egg ship and proceeds to dismantle Eggman's robots one by one, and also temporarily transforms into Super Sonic to wreak havoc on Eggman's base of operations.
However, once he comes face to face with the doctor, who at this point begs for his life, it turns out that Sonic has been lured into a trap. With the push of a button, Eggman absorbs Chaos Energy from Sonic, which he then uses to split the world's continents, while simultaneously transforming Sonic into a porcupine and sending him back to the planet face down. Starting the game off with an embarrassing defeat for Sonic was a shocking way to kick things off Unleashedand to this day, it remains Sonic's most embarrassing defeat to his archenemy.

Moreover
13 Sonic games with the best playable Shadow the Hedgehog
Can it really be the best Sonic game if fans can't play as Shadow the Hedgehog? For those who don't think so, here are his best playable appearances.