Following top secret experiments, people called "viewers" have developed the psychic ability to enter people's memories. John Washington (Mark Strong), a recent widower, is one such gifted individual or "viewer." Washington works for Mindscape, the world's top memory detective agency, which offers the abilities of their psychic employees to help solve criminal cases, although their findings aren't yet recognized as evidence in court.
During a session that goes wrong, John suffers a stroke and is left incapacitated for two years. Financially ruined, he still owns the beach house where his wife died, but refuses to sell it. Desperate for money, John asks his old superior, Sebastian (Brian Cox), for a new job. The case he receives is that of a brilliant but troubled 16-year-old girl, Anna Greene (Taissa Farmiga), who is on a hunger strike. Her stepfather wants her sent to a mental institution, which Anna's mother and Anna herself are adamantly against. John is sent to end her hunger strike.
John and Anna begin their therapy sessions, focusing on Anna's time at a prestigious girl's school and several incidents that happened there. John finds himself drawn to Anna, while, at the same time, remaining wary of her. Anna's maid, Judith (Indira Varma), who John had just started dating, is thrown down the stairs, and Anna is blamed for the incident. John also harbors suspicions towards Anna's stepfather, who he believes has hired a mysterious man to shadow him, as well as towards Sebastian, who John learns has withheld a file on Anna from him. Anna's behavior towards John becomes more flirtatious, and she draws a portrait of him with the caption, "You are my only safe place."
John learns that Anna had been involved in a sexual relationship with her photography teacher, Tom Ortega, who took erotic pictures of her. However, when he interviews Ortega, who is now serving time in prison, he insists that Anna was the aggressor and set him up. In another session, John and Anna go back to an incident at the school where three of Anna's classmates were poisoned. John accuses Anna of the act but she blames it on another student, nicknamed Mousey. However, when John interviews one of the poisoned girls, she says Mousey does not exist. Anna is able to regain his trust by showing him a photograph of herself and Mousey (Jessica Barden) together.
John and Anna go further back into her memories and recover an image of Sebastian approaching her as a four-year-old, which causes John to believe that Anna was sexually molested by Sebastian as a child. John accuses his boss of molesting Anna but Sebastian vehemently denies. John informs Anna's parents of his diagnosis and suggests they do not institutionalize their daughter as they had previously planned. Back at his home, John discovers that the signature on Anna's portrait of him matches one supposedly written by Mousey on the photograph. Going through Anna's yearbook, he sees that the girl from Anna's memories was not nicknamed Mousey. Just then he gets a frantic, fragmentary phone call from Anna.
John races to her home to find that someone has broken in. From the home’s security room, John sees Anna, distraught at discovering the murdered bodies of her parents, fleeing in panic from an unseen assailant. John calls the police but is told that someone else has already called them. He then follows Anna into the woods. As the police begin to arrive, Anna comes up to John, tells him she is sorry, and runs away. The police arrest John for supposedly attacking Anna. There is blood on his hands and other evidence which seem to indicate that he broke into the home, drugged her parents, who are revealed to still be alive, and then attacked Anna.
After being arrested, interrogated by the police, and jailed, John is visited by the man who has been following him. It turns out that this man is another memory detective who has been conducting sessions with John to recover the truth about Anna. The memory detective concludes that Anna manipulated her own memories in order to frame John as her killer. Instead, she likely faked her own death in order to escape her parents, who she knew would never stop searching for her if she were alive. John apologizes to Sebastian, who promises to use this new information to secure John's release.
Elsewhere, Anna arranges to have John sent a single red rose, along with a picture of her holding a recent newspaper to show that she is still alive. John, now released from prison, drives to the beach house to find a new family has bought it and are sitting happily together on the front porch. John is then able to move on with his life and find peace with Judith.
- Mark Strong as John Washington
- Taissa Farmiga as Anna Greene
- Noah Taylor as Peter Lundgren
- Brian Cox as Sebastian
To be added