The Nightmare King is the king of nightmares who's identity was revealed in Micool's Second Quest. He appears as the Final Boss. He is announced to be the guy who gave Groudous Maximus his army and gave him all his powers that he has today. He made a deal with him back when Groudous was young:
"In 23 years there will be someone with power somewhat equal to mine, except he will try to use his powers AGAINST me and might even succeed. I want you to kill that certain person. I will tell you who it is when the time is right."
Groudous agreed. So he instantly transformed into the powerful and dark being he is today. He gave him an army and a castle and everything he wanted.
In Micool's Second Quest, after Groudous is defeated, his power is drained and sent back to the Nightmare King, making him stronger. He is also revealed that he is the one who truly had Gardenia (in HIS castle) and that the Gardenia was him in disguise (but Groudous didn't know until she disappeared into thin air).
When Micool finds the Nightmare King again he sees that Gardenia is dangling from a rope above a pit of lava. The Nightmare King talks to Micool for a bit and they soon fight. After a few moments of fighting the Nightmare King realizes what Micool's true fear is; his worst nightmare is that Gardenia dies. So the Nightmare king makes a deal with him that if Micool becomes his loyal slave for all eternity that he might consider not ending Gardenia's life.
Micool accepts this deal, but the Nightmare King tells his minions to kill Gardenia since the agreement was that he might consider not killing here, not actually saying that he wouldn't kill her. Micool gets enraged but instead of turning into Dark Micool he turns into Super Micool (A more heroic form of Dark Micool) and starts defeating the Nightmare King and destroys the castle and The Kingdom of Nightmares and rescues Gardenia. The energy The Nightmare King had absorbed returns to their rightful owners (even Groudous') and peace is restored. However, the Nightmare King is still alive and vows revenge for the loss of his kingdom, meaning that he might appear later in other Micool games.