In the final future seen in S5, Starlight refuses to believe that it isn't an illusion just created by Twilight and tears apart the time travel scroll, trapping them. The world turns out to be a seared wasteland where everything they come across is burned to a crisp in unrelenting sunlight.
They find solace in Everfree Forest, where Luna has embraced her Nightmare side and allied (and more) with Queen Chrysalis in an attempt to at least save the lives of some her beloved ponies. The horror of the present they're stuck in sets Twilight on a course to try and figure out what happened and how to stop it. It turns out that she is no where near ready to face the enemy that took over that future. After all, how do you fight someone you love?