Sargeras led the army of the titans and was charged with defeating and imprisoning demons of the Twisting Nether so that their demonic brand of evil wouldn't spread to other worlds and mess up the Titans grand vision of an orderly universe. There was an innate problem with this -- Sargeras, a creature of good that was unable to even fathom the thought of pure evil, found himself suddenly confronted with it. With the knowledge of this kind of evil existing in the universe, Sargeras began to go insane, convincing himself that the Titans themselves were responsible for creation's failure -- that the order they sought was unnatural, and a direct cause of the corruption and evil present in the universe. Sargeras devoted the rest of his existence to destroying the work of the Titans, forming an army known as the Burning Legion to aid him.
Enter Azeroth, a world teeming with life, order, and on top of all of that, the Well of Eternity. It was a source of limitless power, and Sargeras wanted it for his own purposes. This story of course ends with the War of the Ancients, and the fall of Sargeras at the hands of Cenarius, the night elves, the dragon aspects, and a couple of time travelers. Sargeras found himself abruptly destroyed -- or rather, his physical being in the world of Azeroth was destroyed.
It is my speculation that this is the precise moment when the destruction of Azeroth went from a simple plan to foil the Titans' work, to something far more personal. It wasn't just that Sargeras was defeated -- it was that his defeat came not by Titans that were his peers in power, but by the little dinky wee creations the Titans made. These things weren't even remotely godlike, and yet they were capable of cutting off his plans for world domination? Inconceivable. Since then, Sargeras has tried time and time again to take over Azeroth by many methods, all of which have failed to this date -- and his army, the Burning Legion, are just as obsessed with this eventual outcome as their leader is.
There were two main lieutenants in charge of the Burning Legion, eredar that had been corrupted to serve under Sargeras -- Archimonde the Defiler, who was chosen to lead the army into battle, and Kil'jaeden the Deceiver, who was charged with finding the darkest races in the universe and recruiting them into the ranks of the Legion. Kil'jaeden found those recruits with the orcs of Draenor and their leader Ner'zhul.
Check out the Know Your Lore: Ner'zhul
article for more information on the orc leader and his dealings with the Burning Legion.
Ner'zhul spent the latter half of his life thinking about death, about its inevitability, about how he could escape it. He had a plan to escape the Burning Legion's hold and jump through a portal along with the rest of the orcs to a new land where they could rebuild the Horde empire. However, upon rushing through the portal to his supposed freedom, Ner'zhul was met by none other than Kil'jaeden, who was displeased to say the least with Ner'zhul's actions. Kil'jaeden, with one act, insured that death would be all that Ner'zhul would ever know, for eternity. Severing Ner'zhul's spirit from his body, he forged a new entity out of the pieces of the former shaman's soul -- an entity known as the Lich King.
The Lich King -- the entity, not Ner'zhul, was a creation of Kil'jaeden. This entity was specifically designed to use death as a tool to conquer worlds, and given the ability to raise the dead and rule over it telepathically, holding the Scourge under its thrall. The Lich King was placed on Azeroth to release the Scourge and weaken the mortal races while the Burning Legion attempted for the second time to obtain and corrupt the Well of Eternity -- or rather, the newer, slightly weaker version of it, as well as the World Tree Nordrassil. The Burning Legion knew from their previous attempts that the mortal races of Azeroth were too strong to simply ignore, and that something would have to be done to prevent their meddling, hence the Lich King.
Starting in Northrend, the Lich King's hold slowly spread. The method was simple -- kill creatures, and then raise them as part of an undead Scourge -- a Scourge completely under the Lich King's hold. Each death only served to fuel the Lich King with more power, making him stronger and more capable, using the Scourge he had created to kill more creatures, and raise even more corpses. Thus creating an unending cycle of death that would spread across Azeroth like a plague -- and conveniently distracting those pesky mortals from noticing the encroachment upon Hyjal. This was all done telepathically -- Ner'zhul didn't have a body, he was just...there. Hovering around in a sword and a hat.
What Kil'jaeden and the rest of the Burning Legion didn't consider was that which they'd ignored far too many times -- the nature of the mortal spirit. The Lich King was something they viewed as a servant, nothing more -- and as the Lich King's power grew, so grew his resentment. Fueled by the angry spirit of Ner'zhul trapped within, the Lich King sought not only to conquer Azeroth and fuel its own power, but also to escape from the Burning Legion once and for all.
What can be assumed is that Kil'jaeden, Sargeras, and the rest of the Burning Legion didn't see the inherent weakness in tying a mortal spirit to this kind of a tool because they didn't have any experience with it. These are beings of pure evil -- they don't know anything about hope, tenacity in the face of adversity, determination, anything that drives a mortal being to do what they have to do to make things right. The Lich King's betrayal blindsided them because they simply weren't prepared for it.
The Burning Legion have fought back -- first by trying to get Illidan to work for them, a method that failed, and secondly through the Scarlet Crusade. What better way to destroy a mortal spirit than by manipulating mortals? But what they don't realize, what they cannot realize and what will eventually be the downfall of the Burning Legion is that they simply cannot fathom or predict what mortals will do. They view these creatures as tools, and forget about that pesky element called free will. They expect mortals to fall for these kinds of deceptions without question, and time and time again they are proven wrong -- but they never learn from these failures, they simply repeat the same mistakes.
This is why the creation of the Lich King was a mistake to begin with -- they tied a mortal spirit to the position and assumed that that mortal spirit would just accept its newfound powers and fall into line with the Burning Legion's plans. But Ner'zhul's spirit, and later Arthas' spirit, would not simply follow someone else's command. They were both born and bred leaders, not followers -- and there was no way they were simply going to let the Burning Legion, or anyone for that matter, walk all over them.
The Lich King continued, this time with new purpose -- destroy Azeroth, let it be consumed by death, as that was all that was keeping the Lich King alive. But something held it back, and continued to hold it back -- a spark of humanity. Ner'zhul had joined with Arthas, and the human's spirit simply wouldn't let the world be destroyed.
FINAL WARNING! The next page contains Arthas: Rise of the Lich King spoilers. And Lich King fight spoilers. If you'd rather go read the novel (Which I highly recommend!) and play through the Lich King fight, DO NOT CLICK. If you'd like to throw caution to the wind and read about all of this stuff, please continue!