Nightmare Moon

"Remember this day, little ponies, for it was your last. From this moment forth, the night... will last... forever!"

- Nightmare Moon "You little fool! Thinking you could defeat me!? Now you will never see your princess or your sun."

- Nightmare Moon's mocking words to Twilight.

Nightmare Moon is the corrupted form of Princess Luna, the younger sister of Princess Celestia. As Nightmare Moon, she first appeared as the main antagonist in the Season 1 premiere of My Little Pony Friendship is Magic.

It is unclear if "Nightmare Moon" is an entity which possessed Luna or not; the show seems to lean that Nightmare Moon is Luna's alternate personality but the comics state that Luna was corrupted during her time on the moon.

History
Long ago, Luna and Celestia were both the rulers of Equestria, a land inhabited by ponies. Every morning, Celestia would raise the sun, and every evening, Luna would raise the moon. Together, they kept the balance perfectly. One day, however, Luna grew jealous: the ponies would be awake to enjoy the day and love, admire, and appreciate Celestia's work, but would always sleep through her far more beautiful night. One day, Luna turned on Celestia, saying she should be the only princess in Equestria, and raised the moon before the bitterness in her heart manifested and transformed her into Nightmare Moon.

Celestia did not want to fight Nightmare Moon and told her to lower the moon, but Nightmare Moon said her only royal duty was to destroy Celestia, and shot at her with magic beams, eventually knocking her down. Seeing no other way, Celestia reluctantly used the Elements of Harmony to overpower Nightmare Moon and banish her to the moon, creating the phenomenon known as "the Mare in the Moon" (a unicorn's face imprinted upon the surface of the moon). It is said that in a thousand years, on the longest day of that year, Nightmare Moon will make her return.

Nightmare Moon's return and redemption
Upon reading an ancient legend, Twilight Sparkle realized Nightmare Moon is about to return, however her mentor, Princess Celestia, encouraged her to make friends instead of worrying about the supposed "old pony's tale". Unfortunately, Twilight turned out to be right and Nightmare Moon was released during the Summer Sun Celebration, replacing Celestia who was supposed to attend it. Twilight and her soon-to-be friends chased Nightmare Moon into the forbidden Everfree Forest.

After conquering many obstacles left by Nightmare Moon in their path, they finally found the twisted mare herself along with the ancient Elements of Harmony, now reduced to inert stones. As Nightmare Moon whisked the Elements away, Twilight followed her into the portal and confronted her alone. She tried to use the Elements of Harmony like Celestia did, but for that she had to find the "spark" that would make a sixth Element appear. However, no matter how hard she tried, she couldn't make the spark, and Nightmare Moon destroyed the Elements.

Fortunately, when Twilight heard her new pony friends calling for her, she felt a different spark in her heart; making her realize that the real Elements are not just some stones: they exist in the hearts of her friends. That spark triggered the final element: Magic (also known, of course, as Friendship), and reanimated the shattered Elements, converting them into jewels for the six friends to bear. Using the Elements of Harmony, Twilight activated a spell that struck Nightmare Moon, exorcising the darkness from her and transforming her back into Princess Luna.

Celestia arrived in the ruins where the battle took place, admitting that she knew of Nightmare Moon's return, but knew the only way to defeat her was for Twilight to understand the importance of friendship. Celestia walked over to a cowering Luna, who apologized in tears for her actions, and was granted forgiveness. Later at the celebration (held by Pinkie Pie), even the other ponies forgave Luna, gifting her with a flower necklace.

Nightmare Night
In the season 2 episode Luna Eclipsed, Princess Luna, now uncorrupted (And with a new look. Lauren Faust, the show's creator, stated that this was because when Nightmare Moon was defeated, Luna was reborn with very low magic levels, and she transformed after getting her good powers back), returns to Ponyville during the holiday Nightmare Night, a holiday dedicated to Nightmare Moon depicting her as a scary bogeyman. Luna, with Twilight's help, tries to change her image from that of the terrifying Nightmare Moon, to a favorable one as Princess. Unfortunately, the nature of the holiday, combined with Luna's outdated mannerisms and flair for the dramatic, make her subjects more scared of her than ever. Her first attempts end disastrously, prompting her to decree Nightmare Night canceled, but Twilight persuades her to give Ponyville another chance. When Luna discovers that the residents actually enjoy being scared as part of the night's festivities, she uses the Nightmare Moon persona to help them have fun and thus gains their trust and friendship, particular that of a colt named Pipsqueak.

Season 4
During the Season 4 premiere two-parter, Princess Twilight Sparkle, Twilight attempts to figure out the source of the chaos seizing Equestria by drinking a potion which gives her flashbacks of the past. One of the flashbacks she experiences is of Luna becoming Nightmare Moon and assaulting Princess Celestia. At first Celestia is reluctant to fight her sister, but Nightmare Moon assaults her with dark beams and eventually wounds her, sending her plummeting to the ground. However, Celestia promptly recovers and arms herself with the Elements of Harmony, the power of which she channels into a powerful beam that overwhelms Nightmare Moon's defenses and seals her inside the moon.

Season 5
In the episode Do Princesses Dream of Magic Sheep?It is revealed that Luna never truly forgave herself for her transformation into Nightmare Moon and created a creature known as the Tantabus to punish her by turning her dreams into nightmares about Nightmare Moon. However, when the Mane 6 mysteriously show up and try to defeat the Tantabus, it becomes aware of their existence and leaves Luna to infiltrate their dreams. Luna and the Mane 6 try to fight off the monster, but the problem becomes worse when Pinkie Pie dreams of sharing a giant ice cream sundae with all the ponies in the entire town, giving the monster knowledge of all the residents of Ponyville. Luna uses her power to bring all of the citizens of Ponyville into the same dream and they try to use their dream abilities to bring down the Tantabus and prevent it from reaching the real world. Despite their best efforts, the monster becomes too powerful for them to fight off and it heads for the real world. Twilight realizes that Luna's guilt is what's fueling the monster and causing it to grow bigger. Twilight and her friends make her see that she and Nightmare Moon are not the same, that Luna is doing everything she can to save Equestria from the Tantabus at her own risk and that she is not alone, that everyone from the Mane 6 to all of Ponyville and beyond trust her completely and implore her to trust them on this. A tearful Luna finally lets go of the past and is now able to finally forgive herself, destroying the Tantabus, and sleeping happily and peacefully for the first time in a millennium.

In the third of many alternate timelines created by Starlight Glimmer in the season finale "The Cutie Re-Mark", Nightmare Moon is in power, having imprisoned Celestia in the moon for years and with Rarity and Rainbow Dash working for her. When Twilight mentions time travel, Nightmare Moon tries to force her to lead her back in time to stop the Elements of Harmony from being found, threatening Spike. She shatters the Timberwolves that attacked Twilight and Spike, but with teleportation, Twilight gets Spike away from Nightmare Moon and travels back in time again in another attempt to fix the timeline.

Season 7
In "A Royal Problem", Starlight Glimmer has a nightmare in which her fears of accidentally driving Celestia and Luna farther apart by switching their cutie-marks result in Luna transforming back into Nightmare Moon. As Celestia (having taken over Luna's duties) prepares to fight Nightmare Moon, an evil version of Celestia emerges, stating that, if Luna can turn into Nightmare Moon, Celestia can turn into Daybreaker. Daybreaker then states that Celestia doesn't need Luna and then engages Nightmare soon in battle, stating that she shouldn't have banished her, but destroyed her instead. Celestia tries to stop the fight, however, Daybreaker refuses and continues trying to destroy Nightmare Moon, forcing Celestia to visit Luna's dream and get her help. As Celestia and Luna return to Starlight's dream and reconcile, Daybreaker manages to overpower Nightmare Moon and begins blasting at her again, however, Celestia teleports between their beams, and erases both of them from Starlight's dream.

Other appearances
Luna becomes a recurring heroic character in the series. At the beginning of Seasons 2 and 3, it's revealed that Luna, alongside Celestia, turned Discord to stone with the Elements of Harmony and imprisoned King Sombra in ice while turning him to shadow, about a thousand years ago sometime before her transformation into Nightmare Moon.

Nightmare Moon in comics
In Issue 6 (Part 2 of the second arc), Nightmare Moon is depicted as a separate entity from Luna, originating from the moon (as evidenced by her speaking to Rarity while possessing her, and speaking as if she were the original Nightmare Moon). It is said she convinced Luna to let her possess her (Luna also says "the Nightmare Forces" told her what to do to make ponies fear her), and that she promised the Nightmare Forces a kingdom of their own. When the Mane 6 restored Luna, Nightmare died, but was revived through the cycle of the new moon, and corrupted the inhabitants of the moon into new Nightmare Forces.

Nightmare herself convinced Rarity to let her possess her, becoming Nightmare Rarity.

In Issue 7, Nightmare Rarity imprisons the ponies in her dungeon once the Nightmare Forces defeat them, and resists Spike's attempts to get through to her. She tries to trick him with an illusion, but he realizes her deception. She has Shadowfright and his sidekick capture him and says the nightmare has only begun.

In Issue 8, the ponies escape the dungeon and de-corrupt Shadowfright's sidekick, Jerome, with the power of friendship. Luna does the same to Shadowfright and his army, turning them back into the denizens of the moon. The ponies then use this power of friendship on Nightmare Rarity to weaken her, and with this, them thinking of memories of Rarity, and Spike's love for her along with his restored Fire Ruby, the Nightmare Energy and spirit of Nightmare Moon are destroyed, releasing Rarity from their control.

Luna appears in the comics as well, though not as Nightmare Moon, and with her mane and tail the way they were after she was restored.

In issue 32, moon rocks from the battle between Celestia and Nightmare fall down to the planet and cause some apples to come to life.

FIENDship is magic issue 4 explains what Nightmare Moon did on the moon. She came across some creatures who make ponies' dreams. She tried to invade Celestia's dream to haunt her, but it was too strong. So she invade other ponies' dreams to spread rumors about Celestia. Celestia quickly put a stop to this. When Nightmare finally reaches her dream, Celestia banishes her permanently. Nightmare then turns the creatures into the nightmare forces.

Theories
There are several theories about Nightmare Moon and Luna which say they're not the same entity. This was confirmed by Lauren Faust herself (though she also gave a speech in an interview about Nightmare Moon's "reformation"). Nightmare Moon could be in fact an embodiment of dark magic possessing Luna and keeping her prisoner under her evil influence till she was finally released by the Elements of Harmony. However, this theory has been debunked by the episode "Do Princesses Dream of Magic Sheep?".

As King Sombra made the Crystal Empire disappear for a thousand years, it was speculated that he had something to do with Luna's transformation into Nightmare Moon. He could have magnified her existing jealousy and bitterness into a dark transformation, or, in accordance with the above theory, a manifestation that possessed her. This theory may have been proven wrong as it was revealed that Celestia and Luna defeated Sombra in the past and imprisoned him, though that does leave the possibility that Sombra only started a more gradual transformation from Luna into Nightmare Moon. This theory was expressed in the youtube video, Fall of the Crystal Empire.

It has also been speculated by G1 fans that Tirek exists in Friendship is Magic and was the one behind Nightmare Moon's transformation. However, when Lord Tirek finally appeared he displayed no such power.

It has been said that there was an outside force behind Luna's transformation into Nightmare Moon, who also might have had a hand in Discord's escape. In the comics it is implied that this force was the Nightmare Forces, directly possessing her while exploiting the bitterness in her heart to get her to accept them (although it also could be that the Nightmare Forces in the comics are the spirit of Nightmare Moon since she still seems to be Luna, or at least a part of her).

Some believe Nightmare Moon to be an apocalyptic villain since eternal night would cause the world to freeze. Lauren Faust has said that eternal night was Nightmare Moon's first step to a plan to "usher in an era of evil".

It has also been speculated that she is now a ghost and that she is the mysterious Shadow Pony haunting Celestia and Luna's old castle in the Season 4 episode Castle Mane-ia, although recent comments have made this figure more likely to be Tirek.

Due to Stygian having a similar backstory and transformation into the Pony of Shadows, which occured through him merging with a sort of "Shadow" strongly resembling a symbiote, it is possible (and, aside from the Nightmare Rarity comics, it is implied by the Legends of Magic comics) that Luna similarly merged with a "Nightmare" symbiote (though one weaker than the Shadow, as the Pony of Shadows was not purified by the Elements of Harmony while Nightmare Moon easily was), which she would have let in out of jealousy, to become Nightmare Moon.

Season 1

 * Friendship is Magic - Part 1
 * Friendship is Magic - Part 2

Season 2

 * Luna Eclipsed (Luna in disguise)

Season 4

 * Princess Twilight Sparkle - Part 1 (flashback)
 * Princess Twilight Sparkle - Part 2 (flashback)

Season 5

 * The Cutie Re-Mark - Part 2 (alternate-timeline)

Season 7

 * A Royal Problem (dream)
 * Shadow Play - Part 2 (mentioned)

Friendship is Magic

 * Nightmare Rarity
 * Ponies of Dark Water

My Little Pony: FIENDship is Magic

 * My Little Pony: FIENDship is Magic Issue 4

Specials

 * w:c:mlp:My Little Pony Annual 2013 (cameo)

Trivia

 * Nightmare Moon could be an evil and jealous personality of Princess Luna, just as Mal is the evil personality of Mike on Total Drama: All-Stars.
 * Nightmare Moon has also been compared to Maleficent, as she says "Stand back you foals" to the guards, which echoes Maleficent's line "Stand back you fools".
 * Nightmare Moon might have been inspired in part by Nightmare, the main villain of Kirby's Adventure, whom Kirby fights on the moon. She also may have been inspired by the G1 villain Tirek, as the two share many similarities. In fact, many fans of the G1 series believe Tirek to be the one who manipulated Luna into becoming Nightmare Moon. Luna's transformation to Nightmare Moon as shown in Princess Twilight Sparkle also looks similar to transformations caused by Tirek's Rainbow of Darkness.
 * Luna's appearence drastically changes between the first two episodes and Luna Eclipsed. She becomes taller with a more slender build, a darker coat, and a translucent mane and tail filled wih stars, greatly resembling her sister Celestia. This may be due to her regaining power that was drained from her after getting hit by the Elements.
 * When Princess Luna is restored, Nightmare Moon seems to shatter to pieces, as pieces of what is believed to be the evil of Nightmare Moon are shown laying around Luna after the Elements are used on her. King Sombra is also shattered to pieces, as well as G1 villain Lavan. However, later events prove that Nightmare Moon and Luna are one and the same, thus it was only the evil inside her, whereas Sombra and Lavan were killed.
 * Nightmare Moon is an unusual inversion of the IDW comics' penchant for retconning the deaths of villains. In addition to having it so that Queen Chrysalis survived her fall (though her death in the show was never confirmed) and reviving King Sombra, IDW also depicted Terrorsaur, Scorponok, and Tarantulas surviving their deaths in the TV series Beast Wars. In the show, Nightmare Moon is Luna, and therefore still lives, while in the comics, Nightmare Moon is a separate entity from Luna and is destroyed by Spike.