King Sombra is the main antagonist of the My Little Pony: Friendship is Magic Season 3 premier, "The Crystal Empire", and the Season 9 premier, "The Beginning of the End". He is an evil, intelligent, and powerful unicorn king who enslaved the Crystal Empire, and is one of the most irredeemably evil villains in the series. He is based off Sauron from Lord of the Rings.
He is voiced by Jim Miller in Season 3 and Alvin Sanders in Season 9.
King Sombra's past is unknown, until the point in which he took over the Crystal Empire, enslaving the Crystal Ponies and setting traps in place to protect the Crystal Heart, an item capable of defeating him. It is presumed that he killed the previous ruler of the Crystal Empire, as no "Crystal Princess" is seen before Cadance takes the throne in the present day. Princess Celestia and Princess Luna turned him to shadow and banished him to the ice of the Arctic North, but not before he cast a curse causing the Crystal Empire to disappear.
A thousand years later, when the Crystal Empire returns, so does Sombra. Princess Cadance casts a magic barrier of love and light to keep Sombra out, but he counters Shining Armor's magic and later encrusts his horn with dark crystals, blocking his magic. He tries to kill the Mane 6 and Spike when they arrive, but they get through the barrier.
Slowly, Sombra returns closer to physical form, and when Cadance briefly lets her barrier down, Sombra tries to enter the Crystal Empire, but his horn is amputated when Cadance puts the barrier back up. Sombra uses this horn fragment to spread his dark crystals through the Crystal Empire while Twilight Sparkle and Spike get through his traps. When Sombra is alerted by Twilight tripping an alarm, he traps her in a ring of dark crystals, forcing Spike to get the Crystal Heart to Cadance, who at that moment runs out of power, allowing Sombra to enter the Crystal Empire, much to the Crystal Ponies' horror.
Before he can do anything else, Sombra notices Spike with the Crystal Heart and attempts to impale him with a dark crystal and take the Crystal Heart, but Shining Armor throws Cadance, who rescues Spike and sets the Crystal Heart back into position. Cadance and the Crystal Ponies proceed to unleash the Crystal Heart's power, destroying Sombra.
Season 5 (alternate future)
When Starlight Glimmer alters time, the first of many bad futures she creates has King Sombra in power, with Princess Celestia leading a war against him that seems to be inspired by World War II. Sombra brainwashes the Crystal Ponies to do his bidding, forcing them to fight the other ponies, who are unable to win the war against him, and it was likely he who cut off Rainbow Dash's wing, as she is seen with a mechanical wing. However, this bad future is erased when the timeline is restored.
King Sombra is later resurrected by Discord, posing as the ancient villain Grogar, with a necromantic ritual. "Grogar" then summons Sombra, along with Queen Chrysalis, Lord Tirek, and Cozy Glow, to his lair and tells them they must work together to defeat the ponies (with Discord's true intent being to stage an epic battle for Twilight to win to improve her confidence). Proving to be pompous and arrogant, Sombra refuses to work with the other villains, preferring to take over Equestria on his own. "Grogar" accepts this, telling Sombra to submit to him when he fails or he will kill him again, and sends him to the Crystal Empire. Sombra easily takes over the Crystal Empire, capturing Princess Cadance, Shining Armor, Flurry Heart, and the Crystal Heart. The Mane 6 arrive and seemingly destroy Sombra with the Elements of Harmony.
However, Sombra faked his death so they would lead him to their source of power. He destroys the Tree of Harmony and traps the Mane 6, deciding to not kill or control them so they can experience their worst fear of him taking over Ponyville. Sombra brainwashes all the ponies of Ponyville, then leads them to invade Canterlot, brainwashing its inhabitants as well and taking it over.
Having dug out of their prison, the Mane 6 confront Sombra, convincing Discord to help them. Discord fights Sombra, easily countering his attacks, but when Sombra directs an attack at Fluttershy, Discord takes the hit and pretends to be wounded so that the Mane 6 will realize that they have what it takes to defeat Sombra, who decides to kill the Mane 6 in this moment. Twilight faces Sombra with her friends at her side, countering his attacks. Eventually, the Mane 6 become empowered by their friendship, much to Sombra's shock, as he thought they were powerless without the Elements. Declaring that "Friendship is Magic", the Mane 6 unleash a wave of magic which destroys Sombra for good and releases all ponies from his control.
"Grogar" does not revive Sombra a second time, showing his demise to Chrysalis, Tirek, and Cozy Glow and using him as a warning to intimidate them into going along with his plan.