The game opens with a prologue during the summer of 2049 in a snowstorm. In a modern, broken-down grocery store, Nier (Jamieson Price) fends off attacks from ethereal monsters to protect his sick young daughter, Yonah (Heather Hogan). After defeating the monsters, he checks on Yonah, who has begun to cough badly. The game then cuts to 1,312 years later, where the player sees what appears to be the same two characters, now living in a village built upon the ruins of an old town. The low-technology village is one of several, and is surrounded by more modern ruins such as the remnants of train tracks and industrial machinery. The areas between towns are filled with monsters known as Shades that attack travelers.
As Yonah's illness, the Black Scrawl, is terminal, Nier sets out to look for a cure. As he does, Nier finds a talking book, Grimoire Weiss (Liam O'Brien), which suggests that the two team up to use Weiss' magic and to find a cure for Yonah's disease. In their search, they encounter Kainé (Laura Bailey), a hot-tempered and foul-mouthed swordswoman; and Emil (Julie Ann Taylor), a blindfolded boy whose eyes petrify anyone they see. After journeying for a time, the village is attacked by a giant shade; the battle culminates in Yonah being carried away by a master Shade that suddenly appears—the Shadowlord—who carries his own book, Grimoire Noir.
The game then jumps five years forward. Nier and the others are trying to find the parts to a key that they believe will help them locate the Shadowlord and Grimoire Noir. After defeating five Shades and assembling the key, the team go to defeat the Shadowlord. There, Devola and Popola (both voiced by Eden Riegel), characters who have been guiding Nier on his quest, appear to try to stop them. They explain that over 1300 years prior, humanity faced extinction due to an incurable disease. In an attempt to survive, they separated their souls from their bodies using Grimoire Noir and Weiss. They created clones resistant to the disease, Replicants, and intended to recombine the souls, or Gestalts, with the Replicant bodies once it had died out; Devola and Popola were androids set to oversee the project. Over time, the Replicants had begun to form their own identities; while the Gestalts, or Shades, had grown aggressive to them.
Nier defeats the pair, with Emil sacrificing himself to ensure his friends' progress. The remaining group then defeats the Shadowlord, and the player discovers that he is the Gestalt form of the Nier from the prologue. Driven to protect his Yonah, he was the first Gestalt and has combined her with the Replicant Yonah. The original Yonah, however, tells the Gestalt Nier that she can hear the new Yonah inside her, and that she loves the Replicant Nier and deserves the body just as much. She vacates the body, and Nier and Yonah are reunited.
If the player plays the game again, they start just after the five-year skip. They learn about Kainé's past, including that she is intersex, which along with the death of her parents resulted in her ostracism as a child, and that she is partially possessed by a Shade. The player gains the ability to understand what the shades are saying, including the one possessing Kainé, though in-game Nier, Weiss, and Emil are still unable to. Additional cutscenes are also shown, giving the motivations and backstory behind the Shade bosses that are fought and showing them as sentient people trying to defend their friends against Nier. The ending to the second playthrough shows that Emil survives his sacrifice, and that Gestalt Nier and Yonah are reunited in the afterlife. A third playthrough presents the player with a choice in the ending to save Kainé, who is seen to be dying in agony; Nier can either kill her to end her suffering, or sacrifice his life for her. The latter choice not only erases all memory of him from the other characters' minds, shown in a final cutscene, but also deletes all of the player's saved progress, as if the game had never been played. Moreover, if the player wants to start a new game, they will be unable to enter the same name chosen for the previous playthrough for the Nier character.