In 1947, John Nash (Crowe) arrives at Princeton University. He is co-recipient, with Martin Hansen (Lucas), of the prestigious Carnegie Scholarship for mathematics. At a reception, he meets a group of other promising math and science graduate students, Richard Sol (Goldberg), Ainsley (Jason Gray-Stanford), and Bender (Rapp). He also meets his roommate Charles Herman (Bettany), 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 telecommunication. 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 (Harris) of the United States Department of Defense. 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 (Connelly), asks him to dinner, and the two fall in love. On a return visit to Princeton, Nash runs into Charles and his niece, Marcee (Cardone). 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 Russian agents, led by Dr. Rosen (Plummer). 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 finally confronts Nash with 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 make him lethargic and unresponsive, he secretly stops taking it. This causes a relapse and he meets Parcher again.