The Knightmare was a lengthy conflict that occurred in a possible future between Superman's Regime and Batman's Insurgency, due to the latter wishing to overthrow the new tyranny. Superman would ultimately prevail, however, prompting that possible future's version of the Flash to warn a past version of Batman.
At some point in a possible future, Lois Lane would be killed by Darkseid, with Batman having been unable to prevent it. Consumed with grief, Superman was left susceptible to Darkseid's Anti-Life Equation and allied himself with the forces of Apokolips becoming a dark, tyrannical ruler of the planet. Earth was successfully terraformed by the Mother Boxes and the Regime was founded to aid Superman in his totalitarian regime of Earth, mercilessly killing anybody who opposed him. Batman promptly founded the Insurgency in order to combat this new threat, thus beginning a long conflict.
The war was long and hard, transforming Earth into an apocalyptic wasteland. Among those killed in this future seem to be Aquaman, Wonder Woman, and the Joker, whose weapons and symbol could be seen lying broken in the ruins of the Justice League's headquarters.
After years of conflict, a battle-weary Batman, now living in a bunker and wearing a desert-altered version of his costume, got word of his Insurgency allies finding a piece of Kryptonite, the only remaining hope of defeating Superman. The Insurgency planned to bring the Kryptonite to their base, which Batman awaited cautiously optimistic. However, on the way to the bunker, the insurgents were intercepted by soldiers of Superman's Regime, who destroyed the Kryptonite and continued on their way to the base. When they arrived, Batman met with them and asked to see the Kryptonite, which they had switched out for a decoy of green light bulbs. Once they revealed this, a regret-filled Regime soldier apologized to Batman and held him at gunpoint. He followed through with their commands as the undercover Regime Stormtroopers revealed themselves to Batman and the insurgents. They executed them, as Batman watched helplessly.
Angered, he began a killing spree and gunned down multiple stormtroopers, while helping some of his surviving insurgents escape the area. Although he managed to take down most of the regime soldiers while parademons invaded the area and abducted many of his allies, Batman was eventually overwhelmed by the remaining stormtroopers there who could barely restrain him. He snapped one of their necks, but then was brutally, but barely, beaten by the other stormtroopers. Seeing the damage that Batman was inflicting on the stormtroopers and their inability to restrain him, a parademon knocked Batman unconscious.
Once Batman was detained, Superman was immediately informed. Filled with a mix of anger towards his former friend and a sense of triumph that justice for Lois would finally be done, he flew as fast as he could to the bunker where Batman was held. Meanwhile, at the bunker, a chained-up Batman regained consciousness and found himself among his few remaining Insurgents, chained up as well. Superman himself then landed in the bunker, and his Regime soldiers reverently knelt before their leader. He approached Batman, swiftly murdering the other Insurgency members with his heat vision. Superman then unmasked the visibly horrified vigilante. He expressed his anger at Bruce for letting "her" die, as she was "his world." Superman gave Batman one final sinister sneer, and ruthlessly killed him by tearing Batman's heart from his chest, thereby ending the conflict.
- "Bruce, listen to me now! It's Lois, it's Lois Lane! She's the key! Am I too soon?! AAAA!! I'm too soon! You were right about him! You've always been right about him! Fear him! Find us, Bruce, you have to find us!"
- ―The Flash to Bruce Wayne[src]
With the aid of Cyborg's calculations, the Flash was able to use his cosmic treadmill to run back in time to warn Bruce Wayne of the dangers that Superman could pose.  However, as he reached the Batcave, a dismayed Flash realized that he traveled too far back in time by accident, to a time before Batman had met him or knew who he was. Nonetheless, Flash issued his brief warning of the war, and stressed the importance of Batman finding and founding the Justice League.
Batman, not believing this experience to be a dream, initially used this as an extra justification and motivation in his quest to take down Superman. However, after Superman's death proved Batman's initial thoughts invalid, he finally heeded future Flash's warning, and requested Wonder Woman's assistance in founding the Justice League.
- During Bruce Wayne's nightmare, an omega symbol can be seen scorched into the dried up harbor of Gotham City. In the DC Comics universe, this is the symbol of Darkseid.
- The name "Knightmare" was not used in any of the films, but is used in action figures and video games to refer to it, and it has since gained widespread media usage.
- The "Knightmare" bears some resemblance to the 2013 DC and Netherrealm Studios video game Injustice: Gods Among Us.
- In the game's alternate timeline, the Joker tricked Superman into killing Lois Lane and their unborn child, resulting in Superman angrily killing the Joker against Batman's wishes. Superman, full of grief and anger, then became malevolent and established the One-Earth Regime, with himself as high councilor and some members of the Justice League (along with "conditioned" criminals) joining his regime, while others joined Batman's Insurgency against him.
- Notes on concept art of the Knightmare by Jim Lee state that it takes place five years after the end of Zack Snyder's Justice League, placing it in 2022.
- Zack Snyder Explains How Lois Lane's Death Leads to Knightmare Timeline
- Batman v Superman: Dawn of Justice
- Zack Snyder's Justice League
- Zack Snyder Confirms Fan Speculation: Batman Designed Flash's Knightmare Costume in 'Batman v Superman'
- Flash Used the Cosmic Treadmill in Batman v Superman, Snyder Confirms