In 1947, John Nash arrives at Princeton University. He is a co-recipient, with Martin Hansen, of the prestigious Carnegie Scholarship for mathematics. At a reception, he meets a group of other promising math and science graduate students, Richard Sol, Ainsley, and Bender. He also meets his roommate Charles Herman, a literature student.
Nash is under extreme pressure to publish, but he wants to publish his own original idea. His inspiration comes when he and his fellow graduate students discuss how to approach a group of women at a bar. Hansen quotes Adam Smith and advocates “every man for himself,” but Nash argues that a cooperative approach would lead to better chances of success. Nash develops a new concept of governing dynamics and publishes an article on this. On the strength of this, he is offered an appointment at MIT where Sol and Bender join him.
Some years later, Nash is invited to the Pentagon to crack encrypted enemy telecommunications. Nash can decipher the code mentally, to the astonishment of other decrypters. He considers his regular duties at MIT uninteresting and beneath his talents, so he is pleased to be given a new assignment by his mysterious supervisor, William Parcher of the United States Department of Defense. He offers Nash a job, in which Nash would help him to decode the messages to detect a bomb the Soviets had been hiding. The code is said to be found in normal magazines, newspapers and such. He is to look for patterns in magazines and newspapers in order to thwart a Soviet plot. Nash becomes increasingly obsessive about searching for these hidden patterns and believes he is followed when he delivers his results to a secret mailbox.
Meanwhile, a student, Alicia Larde, asks him to dinner, and the two fall in love. On a return visit to Princeton, Nash runs into Charles and his niece, Marcee. With Charles’ encouragement, he proposes to Alicia and they marry.
Nash begins to fear for his life after witnessing a shootout between Parcher and Soviet agents, but Parcher blackmails him into staying on his assignment. While delivering a guest lecture at Harvard University, Nash tries to flee from people he thinks are foreign Soviet agents, led by Dr. Rosen. After punching Rosen in an attempt to flee, Nash is forcibly sedated and sent to a psychiatric facility he believes is run by the Soviets.
Dr. Rosen tells Alicia that Nash has paranoid schizophrenia and that Charles, Marcee, and Parcher exist only in his imagination. Alicia investigates and informs Nash that the Department of Defense does not have a “William Parcher” working for them and reveals the unopened documents he had delivered to the secret mailbox. Nash is given a course of insulin shock therapy and eventually released. Frustrated with the side effects of the antipsychotic medication he is taking, which makes him lethargic and unresponsive, he secretly stops taking it. This causes a relapse and he “meets” Parcher again.
Shortly afterward, Alicia discovers Nash is once again working on his “assignment” in an abandoned shed not far from their house. Realizing he has relapsed, Alicia rushes into the house to find Nash had left their baby unsupervised and nearly submerged in the bathtub, which had been filling with water. Nash claims that Charles was watching the baby. Alicia calls Dr. Rosen, but Nash believes Parcher is trying to kill her. He rushes in to push Parcher away, and accidentally knocks Alicia and the baby to the ground. As Alicia flees the house with their baby, Nash jumps in front of Alicia’s car affirming to her: “Marcee never gets old! She doesn’t get old!”. Nash tells her that he realizes that he has never seen Marcee age, even though he has known her for three years. He finally accepts that Parcher and other figures are hallucinations. Against Dr. Rosen’s advice, Nash decides not to restart his medication, believing that he can deal with his symptoms himself. Alicia decides to stay and support him in this.
Nash returns to Princeton and approaches his old rival, Hansen, now head of the mathematics department. Hansen grants Nash permission to work out of the library and to audit classes. Over the next two decades, Nash learns to ignore his hallucinations. By the late 1970s, he is allowed to teach again.
In 1994, Nash wins the Nobel Prize for his revolutionary work on game theory, and is honored by his fellow professors, including Hansen. At the Nobel ceremony, he dedicates his prize to his wife, saying “I’m only here because of you.” The movie ends as Nash, Alicia, and their son leave the auditorium in Stockholm; and although Nash sees Charles, Marcee, and Parcher standing to one side and watching him, he looks at them only briefly before departing.