Dr. Constance Petersen is a psychoanalyst at Green Manors, a therapeutic community mental hospital in Vermont. She is perceived by the other (male) doctors as detached and emotionless. The director of the hospital, Dr. Murchison, is being forced into retirement, shortly after returning from an absence due to nervous exhaustion. His replacement is Dr. Anthony Edwardes, who turns out to be surprisingly young.
Petersen notices that this Edwardes has a peculiar phobia about sets of parallel lines against a white background. She also soon realizes, by comparing handwriting, that this man is not the real Edwardes, but an impostor. He confides to her that he has killed the real Edwardes and has taken his place. He suffers from amnesia and does not know who he is. Petersen believes he is innocent and that he is suffering from a guilt complex. He disappears overnight, leaving a note for her. At the same time, it becomes public knowledge that the supposed Edwardes is an impostor, and that the real Edwardes is missing and may have been murdered.
Petersen manages to track him down and starts to use her psychoanalytic training to break his amnesia and find out what really happened. Pursued by the police, Petersen and the impostor (calling himself John Brown) travel by train to Rochester, New York, where they stay with Dr. Alexander Brulov, Petersen’s former mentor.
The two doctors analyze a dream that Brown had. The dream sequence is full of psychoanalytic symbols – eyes, curtains, scissors, playing cards (some of them blank), a man with no face, a man falling off a building, a man hiding behind a chimney and dropping a wheel, and being pursued by large wings. They deduce that Brown and Edwardes had been on a ski trip together (the lines in white being ski tracks), and that Edwardes had somehow died there. Petersen and Brown go to the Gabriel Valley ski resort (the wings provide a clue), to reenact the event.
Near the bottom of the hill, Brown suddenly recovers from his amnesia. He recalls that there is a precipice in front of them, over which Edwardes fell to his death. He stops them just in time. He also remembers a traumatic event from his childhood – he slid down a hand rail with his brother at the bottom, accidentally knocking him onto sharp-pointed railings, killing him. This incident had caused him to develop a guilt complex. He also remembers that his real name is John Ballantyne. All is understood now, and Ballantyne is about to be exonerated, when it is discovered that Edwardes had a bullet in his body. Ballantyne is convicted of murder and sent to prison.
A heartbroken Petersen returns to her position at the hospital, where Murchison is once again the director. Murchison lets slip that he had known Edwardes slightly and did not like him, contradicting his earlier statement that they had never met. Now suspicious, Petersen reconsiders her notes from the dream and realizes that the wheel was a revolver, and that the man hiding behind the chimney and dropping the wheel was Murchison, who shot Edwardes and then dropped the gun.
Petersen confronts Murchison. He confesses but says that he still has the gun and threatens to kill her. She walks away, the gun pointed at her, explaining that while the first murder was committed under the extenuating circumstances of Murchison’s fragile mental state, her murder would certainly lead him to the electric chair. He allows her to leave then turns the gun on himself. Petersen is then reunited with Ballantyne. They leave on their honeymoon together from Grand Central Terminal, where they had begun their investigation of his psychosis.