When we last left our heroes, Princess Twilight Sparkle and her friends were looking for answers to why the Everfree Forest is invading Ponyville. Believing the key lies in one of Zecora's potions, Twilight drinks it only to witness a horrifying sight: Princess Luna transforming into Nightmare Moon once more...Abruptly, Princess Celestia steps in and orders her sister to lower the moon. Nightmare Moon replies that they are not sisters any longer and chases Celestia into the sky, with Twilight struggling to keep up. Though Celestia refuses to attack, a bolt from Nightmare Moon — clearly meant to be lethal — knocks her down, and she reluctantly arms herself with the Elements of Harmony. Nightmare Moon is sent into her thousand-year exile, and Twilight comes back to herself in the present day, realizing she witnessed an event in the past.Thinking she may find more answers if she looks further into the past, Twilight takes another sip of the potion and watches Discord, in the middle of taunting the alicorn sisters and eating a bag of seeds, turned to stone by the power of the Elements. Then she goes instantly to a third, still-earlier vision — the alicorn sisters discovering the Elements at their source: the Tree of Harmony. This magical tree, located deep within the Everfree Forest, kept the forest in check. Twilight concludes that something must have happened to the tree and ventures into the forest with her friends by her side.The girls quickly run into trouble when Twilight accidentally angers a cragodile and has trouble flying away to safety. After the others wrangle the beast, the girls become concerned with Twilight's safety and propose she is better off returning to Ponyville to lead in Celestia and Luna's absence while they continue their search for the Tree of Harmony without her. Hurt by her friends' decision, Twilight reluctantly agrees and dejectedly leaves along with Spike. Once she reaches Ponyville, however, Discord berates Twilight into changing her mind and rejoining her friends.The girls discover the dying Tree of Harmony covered in thorny vines in a cave beneath the ruins of Celestia and Luna's old castle. As the five realize they have no idea how to save the tree without Twilight, she gets ambushed by a group of plant monsters nearby. Spike alerts the rest of the group to save her, and the six all make amends.Twilight decides that only by returning the Elements of Harmony to the tree will they be able to save it, believing that the bonds of friendship between the girls have become so strong that they no longer need the Elements to keep themselves united. The tree is restored, dispelling the vines and freeing Celestia and Luna from their grasp. Just then, the tree sprouts a flower containing a mysterious box with six locks. Unsure of what's inside or where the keys are, Celestia hints that Twilight and her friends will be able to unlock the mystery together.With everything now back to normal, Discord admits to everypony's anger that he was responsible for the Everfree Forest's invasion: before he was defeated a thousand years ago, he sneakily planted the seeds he was eating to steal the Tree of Harmony's magic and capture the princesses, which only started to grow now because the tree's protective magic held them at bay. However, everything still worked out since Twilight managed to learn another valuable lesson about friendship, and is able to perform her flight flawlessly on the day of the Summer Sun Celebration.
Tropes present in this episode (YMMV tropes for the episode can be found here):
Spike does the same while trying to come find the Mane 5 to help Twilight.
All Just a Dream: While Twilight eventually realizes she's Dreaming of Times Gone By after drinking Zecora's potion, this only occurs after she witnesses Nightmare Moon's "return" and Celestia seemingly being badly injured.
Badass in Distress: Twilight gets surrounded by magic-sapping plants and is incapacitated while she's trying to reach her friends inside the forest. Once they get the plants away from her, Twilight helps zap them into oblivion even while groggy.
Celestia and Luna as well, having been captured by the Plunder Vines. Justified, as the seeds from which the vines grew had been sown by Discord, and if anyone were able to conjure something powerful enough to target and capture the princesses it'd be him.
Beam Spam: Nightmare Moon indulges in this, her first act after transforming being to start blasting everything in sight. She also uses this as he main method of attack against Celestia.
Beauty Is Never Tarnished: Even after being briefly knocked out by Nightmare Moon, Celestia doesn't look any worse for wear after she recovers. This is averted however when the two princesses face down Discord, with both appearing rather beaten up and dishevelled.
Berserker Tears: In the flashback, Princess Celestia is crying while unleashing the Elements of Harmony's power against Nightmare Moon.
Big Damn Heroes: Twilight's friends save her from danger twice: once from a giant cragodile, and again when she gets attacked by magic-sapping plants.
Big "NO!": Nightmare Moon lets one out right before getting blasted by the Elements.
Rarity: A valiant effort on both your parts, but the tree remains in jeopardy. Applejack: And I suppose you have any better ideas? (Rarity thinks, but can't come up with anything) Applejack: (fixing Rarity a bad look) That's what I thought.
Brought Down to Badass: The Mane Cast give up the Elements to save the Tree of Harmony, though naturally they've shown themselves to be pretty badflank without them already. Of note, Fluttershy effortlessly cows Discord out of trying to take advantage of them losing the Elements.
Call Back: This episode shows Discord's imprisonment and the events that led to Luna being banished to the moon. Their battle also did quite a number on their castle in the Everfree Forest, hence why it's abandoned in the present.
Chekhov's Gun: The seeds that Discord was spilling everywhere during his first confrontation with Celestia and Luna are actually "plunder seeds", which eventually grew into the plants attacking Equestria. This might explain why he never went into Villainous Breakdown when Celestia and Luna confronted him. He knew they found the power to defeat him.
Chekhov's Skill: When Twilight returns from the Everfree Forest, Discord is seen watching some ponies getting attacked by the plants, then casually makes them vanish at Twilight's insistence, showing he is perfectly capable of removing them.
Combat Tentacles: The more dangerous Plunder Vines act as these, attempting to ensnare unwary ponies. They also attempt to constrict and smother Twilight when she tries to save the Tree of Harmony.
Conspicuous CGI: The Elements of Harmony during the flashbacks are very obvious 3D models.
Continuity Nod: "Does anypony think that this is a lost cause?" - Rainbow Dash to Applejack, Pinkie Pie, Fluttershy, and Rarity. It turns out to be said once before in "The Crystal Empire Part 1".
Converging Stream Weapon: When Celestia uses the Elements against Nightmare Moon, the Element of Magic channels the energy of the other five into a rainbow beam.
Discard and Draw: The group lose the Elements, but are immediately presented with a locked box.
Dismantled MacGuffin: While they have the box, the Mane Six now have a quest to find the six keys, with the location of those keys unknown.
Disney Death: When Twilight sees Nightmare Moon strike Celestia down, she cries in apparent belief that Celestia won't get up. Only afterward does it become clear to Twilight (and less predictive viewers) that this is the ancient past.
Don't Make Me Destroy You: Princess Celestia is initially unwilling to fight Nightmare Moon, not wanting to have to fight her own sister. She soon realizes to her dismay that she has no choice.
Exact Words: Those who paid close attention to the previous episode will realize that Discord was carefully avoiding the questions he was being asked. He's not responsible for what's happening now, and he is innocent of any wrongdoing currently. He never said he had nothing to do with it, however, nor that he had no idea what was going on.
Forgot About His Powers: Not once does Spike attempt to use his dragon-breath to fight off the vines. Twilight likewise forgets her teleporation ability when they get attacked by an alligator.
French Maid: Discord dresses as such to help clean up, but he doesn't do windows.
Godzilla Threshold: The Elements of Harmony were this, back when the Princesses first took them. The point of the Elements is to keep the Everfree Forest in check, but they really needed them to beat Discord and Celestia was confident the tree would retain enough magic to do its job. In the present, sacrificing the Elements to restore the tree also counts, since they're giving up their best weapon against evil.
Group Hug: The Mane Six hug each other after being reunited with Twilight and admitting that if Equestria needs a princess, what they need is their friend.
Hijacked by Ganon: Double Subverted. When vines from the Everfree Forest started invading Ponyville and the princesses went missing, everyone assumed it was a new threat or villain causing all this. At first it seems to be because of Luna becoming Nightmare Moon again, when it's revealed that it was all a flashback. Then it gets double subverted at the end. It turned out that it was caused by seeds that the recently reformed villain Discord planted right before his defeat by Celestia and Luna over a millennium before. The Tree of Harmony's power managed to keep them from growing for that long.
Helping Would Be Kill Stealing: Discord claims as such when he admits he was the one who planted to seeds, stating he wouldn't be a good "friend" by telling Twilight about them without her learning a lesson from the whole ordeal first.
Heroic BSOD: Twilight has one when she thinks Nightmare Moon has killed Celestia.
She has another one when her friends send her away after they agree it's too risky to keep adventuring with them. Discord of all characters is the one to snap her out of it.
Intangible Time Travel: Caused by Zecora's potion. Twilight is able to move around within the visions it creates freely, she just can't seem to interact with anything there.
It's Not You, It's My Enemies: Twilight's friends send her away in the middle of their journey so Equestria can still have somepony to lead them while Celestia and Luna are gone.
Jerkass Has a Point: Even though Discord seems to be taunting Twilight solely for his own amusement, he does have a point about Twilight putting herself above others by not seeing the mission through. Twilight herself realizes this and immediately goes back (of course, he may have intended for her to realize this and go back in).
Karma Houdini: Discord was responsible for the Everfree Forest invading, even if it was a thousand years later than intended, and he didn't call them off despite controlling them in the first place, and he got away with lying to Fluttershy about it. Plus, with the Elements of Harmony now gone, there's nothing the Mane Six can do about it. Well, if you don't count Fluttershy putting the brakes on his excitement of the Elements being gone by reminding him of his promise to her and helping to clean up Ponyville.
Let's Get Dangerous: What led to Celestia banishing Luna to the moon after the latter transformed into Nightmare Moon.
Long Game: Before his initial imprisonment, Discord planted the seeds that would grow into the black vines as a backup plan, but didn't count on the Tree of Harmony's reserve power holding them back for so long. By the time the Tree has diminished enough to cease holding back the seeds, Discord has since gone through a Heel-Face Turn.
Menacing Trot: Nightmare Moon briefly performs a rather awesome one towards Celestia.
Metaphorically True: Last episode, Discord insisted that he "couldn't possibly take responsibility" for the Plunder Vine invasion. This episode it's revealed that he planted the seeds back when Celestia and Luna defeated him the first time, centuries earlier. He may not have caused them to sprout now, but he did plant them in the first place, and he didn't do anything to stop them from spreading when they did. Twilight calls him on this, but being a trickster, he's used to ponies' indignation.
Morality Chain: Fluttershy shows she is this to Discord when he considers recreating his world of chaos until she scolds him and tells him to help clean up if he wants to stay her friend.
My God, What Have I Done?: Twilight and her friends all kick themselves over thinking it was a good idea for Twilight to back out of the search for the Tree of Harmony, realizing that they don't have any clue what to do to save the tree.
Never Say "Die": Played straight when Nightmare Moon declares it is her new duty to "destroy" Celestia. Averted, however, when the Mane Six find the Tree of Harmony wrapped up in Plunder Vines, and Fluttershy flat out says it looks like it's dying.
No Antagonist: Sort of. The Plunder Vines came from Discord before he was reformed.
Noodle Incident: Very little of Celestia's and Luna's quest for the Elements of Harmony is shown, but it can be inferred to be rather harrowing given that the Princesses are visibly dirtied (if not outright injured) by the time they collect the Elements and confront Discord. Luna seems to be particularly the worse for wear. Considering these two have been portrayed as Physical Goddesses so far in the series, this would have to be intense, indeed.
Nothing Is the Same Anymore: The Elements of Harmony, one of Equestria's most powerful defenses, and the Mane Cast's fall back for all emergencies to date, have been returned to their source, which produces a mysterious box that no one knows anything about.
Not Me This Time: Subverted. Twilight's flashback's at first seems to confirm Discord's innocence, but he later admits that the Plunder Vines are technically his doing, just several thousand years later than intended.
Old-School Dogfighting: Celestia and Nightmare Moon engage in an airborne chase around the castle after Nightmare Moon declares her intention to destroy her sister.
Origins Episode: This and the preceding episode serve as one for the Elements of Harmony, which turn out to have come from the Tree of Harmony. This episode also gives viewers a glimpse of Nightmare Moon and Discord's first defeats, courtesy of Zecora's potion.
Pensieve Flashback: Twilight gets to experience this multiple times through Zecora's potion.
Planar Shockwave: When Nightmare Moon is banished, we gets a rainbow-colored one around the Moon.
Pony-Eating Plant: The Plunder Vines have mobile Venus Flytrap-like parts that spray spores that cause anypony that's exposed to them to lose consciousness. They subdue and almost eat Twilight before the rest of the Mane 6 show up to save her.
Power Limiter: The Tree of Harmony keeps the power of the Everfree under control.
Pseudo Crisis: From the previous episode, it seems that Princess Luna has relapsed into her jealousy of Princess Celestia and turned back into Nightmare Moon. Then Twilight discovers she is merely seeing a vision of Luna's banishment from one thousand years ago.
Red Herring: What the flashback with Nightmare Moon ultimately was, as the mentions of Luna being Nightmare Moon as well as the Summer Sun Celebration hinted that she had something to do with the invasion. Twilight herself thought this until Celestia brings forth the original Elements and realizes that she's witnessing a vision of the past.
Reformed But Not Tamed: Spike directly points this out in regards to Discord after the latter convinces Twilight to go back into the Everfree Forest to find her friends. Discord even considers going all out at the end after finding the Elements have merged with the Tree of Harmony again until Fluttershy scolds him for considering it and tells him to help clean up.
The six-locked artifact that sprouts from the tree; since nopony knows where the keys are, they figure it's a mystery they'll have to solve another day.
Also, Twilight never finishes the flashback potion, so she could potentially use it at least once more.
Shameful Shrinking: Discord shrinks when Fluttershy angrily warns him not to try anything just because the Elements of Harmony have been returned to the Tree of Harmony.
Sheathe Your Sword: Celestia initially refuses to raise a hoof against Nightmare Moon, though a bolt of magic to the face makes her rethink this strategy.
Shout-Out: Starting with this episode, Season 4's all-encompassing story arc (of finding the six keys to fit the locks on the box sprouted by The Tree of Harmony) bears a resemblance to "The Key to Time" story arc from Doctor Who; both arcs even take place over 26 episodes. Perhaps someone at Hasbro saw the connection, and that's why they made the conscious decision of making Season 4's premiere coincide with Who's 50th television anniversary.
The way that Princess Celestia conjured up her moon-banishing beam (five beams radiating from the Elements of Harmony into the Element of Magic to create an apex before firing) is similar to the way the Death Star fired its planet-destroying laser.
Sphere of Power: The Elements of Harmony rotating around Celestia in the first flashback, and then again, around both Luna and Celestia in the second one, forming a Sphere of Power.
Discord briefly appears to be sticking out of Twilight's ears while doing his Trickster Mentor spiel. That is to say, he's giving her a Q-Tip. Naturally doubles as a Visual Pun and triples as an Actor Allusion.
When Discord planted the seeds that grew into the plants attacking the Tree of Harmony, he was literally sowing the seeds of discord.
At the conclusion, Twilight performs her "Twilight Sparkleboom" between the setting of the moon and the rising of the sun—right where one would expect twilight to occur.
Tears of Remorse: Celestia sheds tears right before sending her sister to the moon.
That Mare Is Dead: Within the first flashback, when Celestia pleads with Luna to lower the moon:
Nightmare Moon: Luna? I am... Nightmare Moon!
Trickster Mentor: Discord proves himself to be one when he taunts Twilight into returning to her friends after she previously left them for the good of Equestria. He also claims that he deliberately withheld information that he was the one who planted the attacking plants in the Everfree Forest so she could learn a valuable lesson about being a princess.
Unintentional Backup Plan: Before being originally turned to stone, Discord planted seeds meant to siphon the Tree of Harmony's magic and capture the Princesses. Unfortunately for him, he failed to account for the residual magic in the tree, and thus his plan kicked in a thousand years too late.
The Unreveal: We never find out how Celestia and Luna learned of the Tree of Harmony, where it came from, or why their cutie marks are on it. The contents of the box that they receive at the end of the episode are probably not going to be revealed until the end of the season.
Wave Motion Gun: Celestia wielding the Elements of Harmony against Nightmare Moon basically amounts to this.
Webcomic Time: Celestia's speech suggests that Nightmare Moon was released and defeated at the previous Summer Sun Celebration, meaning that the first three seasons all take place during a single year.
Wham Episode: The Elements of Harmony are returned to the Tree of Harmony, and the Mane Six are sent on a search for the six keys to a mysterious box that sprouts from the tree.
What the Hell, Hero?: Rainbow Dash calls out Applejack the moment they realized they needed Twilight right after Applejack's idea to send her away. Applejack flips it around, saying they all agreed to the idea.
Discord gives a subtle one to Twilight for agreeing to leave her friends in the forest.
When Trees Attack: It's revealed that it's not the Everfree Forest attacking, but more specifically the Plunder Vines that sprouted there.
Where It All Began: To save Equestria, the mane cast have to go back into the Everfree Forest, where their journey first started and they first became friends.
The Worf Effect: Justified, both from Worf's point of view and the antagonist's. Discord specifically designed the vines to single out powerful magic users i.e. Celestia and Luna, as well as the Tree of Harmony. But faced with more than one or two targets, the vines have trouble keeping up, and while they can outlast a unicorn they can't outlast Applejack and Rainbow Dash.
World-Healing Wave: When the Elements of Harmony are returned to the Tree of Harmony, it lets loose one of these that obliterates the Plunder Vines. Justified as...well, it's the source of the Elements of Harmony and they're capable of producing one of these.
You Were Trying Too Hard: Twilight complains that she can never get her wings to work the way she wants them to, and Rainbow Dash tells her that it'll just come to her eventually. In the climax, when Twilight is more focused on fixing the tree than flying, she's able to fly up and hover with ease, after which she no longer has any trouble with it.
Your Approval Fills Me with Shame: Discord sarcastically praises Twilight for leaving her friends in the Everfree Forest while she stays. This leads to her returning to the forest.