In Part 1, Twilight and her friends receive letters asking them to meet with Princesses Celestia and Luna, who tell them that things in Equestria have been running so smoothly in recent years that the two of them have decided to retire, and pass rulership of Equestria over to Twilight with the assistance of her friends. Twilight is understandably very nervous, especially since the planned transfer of power is due to occur in just a few days, and despite Celestia assuring her that everything she and her friends had been through over the years had been preparing her for this all along.
Meanwhile, Queen Chrysalis, Lord Tirek, Cozy Glow, and King Sombra (apparently revived just for this purpose) are all suddenly summoned together by Grogar, a very ancient evil creature who was supposedly the very first emperor of the lands that would later become Equestria. Grogar had been slowly regaining his strength and believes the only way to regain power is to gather all the evil masters together and work as a group to defeat Twilight and her friends. The others are skeptical, particularly Sombra, who claims he could take over the Crystal Empire by himself. Grogar gives him a deal; successfully take the Crystal Empire himself and he can keep it, but failure will force him to submit to Grogar.
Sombra wastes no time invading the Crystal Empire, taking control over the minds of the crystal ponies, and capturing Princess Cadance, Shining Armor, and Flurry Heart. Thanks to Cadance sending a message quickly enough, Twilight is alerted, who immediately gathers her friends together. Believing this would be a perfect chance to prove they're worthy of ruling Equestria, and because Twilight is especially worried for her relatives there, they decide to take no chances and bring the Elements of Harmony with them. When they face off against Sombra, the Elements allow them to resist his fear powers long enough for Spike to free Cadance, who then recovers the Crystal Heart, weakening Sombra enough for the Elements to seemingly finish him off. The Main 6 later return the Elements to the Tree of Harmony, and as they talk about how easy that had been, Sombra suddenly reappears and shatters both the Tree and the Elements.
In Part 2, Sombra reveals that he used his apparent defeat to track down the source of their friendship power, and after trapping them in a crystal cage, he leaves to conquer Ponyville. The Main 6 are able to dig their way out of the cage, but by the time they reach Ponyville, Sombra has already taken control of the minds of everyone in town and is gathering them into an army to conquer Canterlot and thus all of Equestria. The Main 6 are powerless to save anyone, and worse due to the loss of the Tree of Harmony, the Everfree Forest has begun to grow out of control into Ponyville.
Sombra marches into Canterlot almost effortlessly, and with Celestia and Luna mysteriously already gone, he easily takes control of the city. Meanwhile, Twilight decides to focus on stopping the Everfree Forest first, but she and her friends end up fighting to a stalemate. Eventually, Celestia and Luna arrive, summoned by Starswirl the Bearded, who had sensed the Tree of Harmony's destruction. Because Starswirl and his fellow Pillars used to keep the Everfree Forest in check before they had planted that Tree, he, Celestia, and Luna stay to deal with it so that the Main 6 can go to Canterlot to deal with Sombra. When they get there, they are joined by Discord, who agrees to help only after they all beg for his assistance. Discord easily holds off Sombra's attacks, but upon discovering Discord's particular fondness for Fluttershy, Sombra focuses an attack directly at her, and Discord takes the hit.
With Discord seemingly weakened to powerlessness, Sombra claims there's now nothing the Main 6 can do to stop him. But Discord reminds the girls that even without the Elements of Harmony, they are still who they are and they still have their friendship, which is what brought them to hold the Elements in the first place. The six girls stand together and proving that friendship really is magic, they awaken the power within themselves that destroys Sombra and returns all of Equestria back to normal. Later, when Twilight confesses that she's not ready to rule Equestria due to not seeking outside help in the first place, Celestia and Luna point out that great leaders acknowledge when they make mistakes and try to correct them, and the two sisters admit they too made the mistake of trying to force Twilight onto their throne so quickly. Although they still plan to retire, they have now agreed to wait a little longer until Twilight is absolutely ready. Meanwhile, with Sombra's defeat, Grogar declares it as an example to the other villains for why they must work together if they wish to succeed.
Definitely a lot to take in for this one. It's interesting to think that Celestia arranging for Twilight to eventually take her place as ruler of Equestria (which I've heard was Lauren Faust's original plan for the show's finale back before it all started) could've been planned for a long time since the very beginning, based on her claim that all the adventures Twilight and her friends had been on could be considered training them to one day take on such a role. The fact that Celestia and Luna were rather excited about helping Starswirl fight back the Everfree Forest as it reminded them of old times when they didn't have to worry about ruling Equestria could be seen as an example of why they even have the desire to retire. And with the introduction of Grogar (another reimagined G1 villain like Tirek), we now have essentially the ultimate evil scheme; combining the forces of all the past villains together (which with another interesting point happens to be exactly the kind of thing the Main 6 have done every time but never done by any of the villains, so this could be seen as now using their greatest weapon against them). Sure, there's still the issue of the destroyed Tree of Harmony, but according to the synopsis I've read, it looks like that'll be addressed in next week's new episode. All in all, an interesting set-up for the final season, which now leaves me especially looking forward to what the finale will be like.