Eighteen months after a destructive attack by General Zod in Metropolis from Man of Steel, Superman has become controversial. Daily Planet journalist Clark Kent, Superman's alter ego, has moved in with Lois Lane. Bruce Wayne, who has operated in Gotham City as the vigilante "Batman" for nearly two decades, sees Superman as a potential threat to humanity. After learning of Batman's activities, Superman also views him as a threat, and seeks to stop him via the Daily Planet articles authored by him as Kent. Wayne learns that Russian weapon-trafficker Anatoli Knyazev has been contacting LexCorp's mogul Lex Luthor. Meanwhile, Luthor tries to convince Senator June Finch to allow him to import kryptonite retrieved from the Indian Ocean following the results of Zod's terraforming attempt, claiming to use it as a "deterrent" against Kryptonians, but she denies the request. He also makes side dealings with Finch's subordinate and demands access to Zod's body and the Kryptonian scout ship.
Wayne attends Luthor's party at LexCorp, where he meets mysterious antiques dealer Diana Prince, and retrieves data from the company's mainframe. While decrypting the drive at the Batcave, Wayne has a dream of a post-apocalyptic world, where he leads a group of rebels against Superman. He is snapped out of the dream by an unidentified time traveler, who warns him of Lane's crucial role in the distant future, and urges him to find "the others". Wayne later realizes that Luthor is not only experimenting with Kryptonite, but also investigating metahumans. One of them is Prince herself, who is an immortal warrior. Wayne admits to Alfred Pennyworth that he plans to steal the Kryptonite to weaponize it, should it become necessary to fight Superman.
Luthor orchestrates a bombing at a congressional hearing where Finch is questioning Superman on the validity of his actions, which have resulted in deaths of civilians. The bomb kills dozens of people, including Finch. Frustrated by his failure to save people, Superman goes into self-imposed exile. Batman breaks into LexCorp and steals the kryptonite, planning to use it to battle Superman by building a powered exoskeleton, and creating a kryptonite grenade launcher and a kryptonite-tipped spear. Meanwhile, Luthor enters the Kryptonian ship and learns of its functions, as well as recorded alien worlds.
Luthor kidnaps Martha Kent, Clark's adoptive mother. He reveals that he has manipulated Superman and Batman by fueling their animosity for each other. Luthor demands Superman fight and kill Batman in exchange for Martha's life. Superman tries to reason with Batman, but Batman instigates a fight and ultimately gains the upper hand thanks to the kryptonite grenades. Before Batman can kill Superman with the spear, Superman urges Batman to "save Martha", whose name is also shared with Wayne's late mother. Lane arrives and explains the situation, convincing Batman that Superman is not a threat. Upon learning of Luthor's plan, Batman leaves to rescue Martha, while Superman confronts Luthor on the scout ship.
Luthor executes his backup plan, unleashing a genetically-engineered monster with DNA from both Zod's body and his own. However, Diana Prince arrives unexpectedly. Revealing her metahuman nature, she joins forces with them to fight the creature. They are soon outmatched by its power, as it can absorb and redirect energy. Realizing that it is also vulnerable to kryptonite, Superman retrieves the kryptonite spear. With Batman and Prince's help distracting it, Superman impales the monster. As it dies, the creature stabs and kills a weakened Superman with one of its bone protrusions.
Luthor is arrested, and while confronted by Batman he gloats that Superman's death has made the world vulnerable to powerful alien threats. A memorial is held for Superman in Metropolis. Clark is also declared dead and Wayne, Lane, Martha, and Prince attend a private funeral for him in Smallville. Martha gives an envelope to Lane which contains an engagement ring from Clark. After the funeral, Wayne reveals to Prince that he plans to form a team of metahumans, starting with the ones from Luthor's files, to help protect the world in Superman's absence. After they leave, a faint heartbeat echoes from Clark's coffin and the dirt around it begins to levitate.