Zack Snyder's Justice League (2021) ends with the Justice League defeating Steppenwolf and Darkseid's invasion force, the resurrection and turn of Superman, the formation of the team, and then an extended epilogue—including a "Knightmare" future sequence and a final scene with Batman and the Joker—that sets up a sequel that was never made. The film does not end on a simple victory; it closes on ominous foreshadowing.

Because "ending" can mean the last few minutes, the resolution of the main plot, or the epilogue's sequel setup, this answer separates those layers. All details below concern the 2021 four-hour Snyder Cut, not the 2017 theatrical Justice League, whose ending differs substantially.

The climax: the Unity is stopped

The film's main conflict concerns three Mother Boxes, which Steppenwolf has gathered to form "the Unity" and terraform Earth into a copy of Apokolips for Darkseid. In the final battle, the League fights Steppenwolf in a ruined Russian facility near a nuclear plant. Superman, revived earlier in the film, joins the fight; the League had resurrected him using the Mother Box in the Kryptonian ship, and he initially attacked them before recovering his memories and identity.

During the battle, the League separates the three boxes before the Unity can complete. Superman and Cyborg together physically pull the boxes apart—Cyborg is central here because his Apokoliptian-derived technology lets him interface with the boxes. With the Unity broken, the invasion fails.

Steppenwolf's death

Steppenwolf is then killed. Wonder Woman and Aquaman wound and restrain him; Superman uses his heat vision to burn away one of Steppenwolf's horns, and Wonder Woman decapitates him with her sword. His severed head is pushed through a Boom Tube back to Apokolips, where it lands at Darkseid's feet—a deliberate message of defiance. This detail matters because it marks the League's victory as a warning to Darkseid rather than a final peace.

Darkseid's response

On Apokolips, Darkseid (who appears in the Snyder Cut, unlike in the 2017 version) reacts to Steppenwolf's failure. He is advised by DeSaad, and the scene establishes that Darkseid intends to pursue Earth and the Anti-Life Equation himself. The film's stakes are thereby raised rather than resolved: the defeat of Steppenwolf is a battle won, not the war.

The epilogue and the Knightmare

The final stretch is a series of epilogue scenes. The most important is the "Knightmare" sequence—a vision or glimpse of a possible dystopian future in which Darkseid has conquered Earth, Superman has fallen under the Anti-Life Equation's influence, and Batman leads a ragged resistance. In this sequence, Batman, Cyborg, Deathstroke, Mera, and the Flash appear in a post-apocalyptic wasteland; Superman appears as a menacing figure. The Knightmare material expands on the "Knightmare" glimpses from Batman v Superman: Dawn of Justice.

Bruce Wayne also has a conversation with Martian Manhunter, who has been posing as General Swanwick (a reveal that recontextualizes earlier scenes). This confirms the League has another ally and hints at a larger cosmic conflict.

The final scene: Batman and the Joker

The film's actual last scene is a dialogue between Batman and the Joker (Jared Leto) in the Knightmare timeline. The Joker taunts Batman about Robin's death—referencing the murdered Robin whose suit is seen in Batman v Superman—and the two exchange barbs about their history. Batman says something to the effect that the Joker is not needed, and the Joker responds with a line implying he will be. The scene ends the film on an unresolved, tense note.

What the ending sets up

The Snyder Cut's ending is explicitly a setup for sequels that were not produced. Snyder has described plans for a second and third film involving Darkseid's invasion, the Anti-Life Equation, and the Knightmare future. The theatrical 2017 Justice League instead ends more conventionally: the League defeats Steppenwolf, and the final scenes show a restored Superman and a hopeful team, with a post-credits tease involving Deathstroke and Lex Luthor. The Snyder Cut's ending is darker and more open-ended, which is a key reason viewers often ask "how does it end" — the answer is that it ends on a cliffhanger-like note rather than a closed resolution.

Why the ending confuses people

Ambiguity arises because the film has multiple "endings": the battle's resolution, the epilogue's Knightmare vision, and the final Joker scene. Some viewers interpret the Knightmare as a dream or a vision rather than literal events; the film presents it as a possible future, and Cyborg's vision earlier in the film supports that reading. The Joker scene is framed within the Knightmare, so it is not "present-day" continuity. Finally, the film's four-hour runtime and chapter structure make the epilogue feel like a separate act. The ending is best understood as: main plot resolved (Steppenwolf defeated, Unity stopped), future threat established (Darkseid), and sequel hooks left dangling.