The Lambert family–parents Josh (Patrick Wilson) and Renai (Rose Byrne), their sons Dalton (Ty Simpkins) and Foster (Andrew Astor), and infant daughter Cali–move into a new home. Shortly afterward, Dalton is drawn to the attic when he hears creaking noises and sees the door open by itself. He falls from a ladder while investigating and sees a figure in the shadows. Hearing his terrified screams, Renai and Josh rush to his aid and declare the attic "off limits" to the children. The next day, Dalton falls into an inexplicable coma.
After three months of treatment without result, Renai and Josh are allowed to take Dalton home. Instantly, increasingly supernatural activity occurs; Renai begins hearing voices over the baby monitor when no one is in Cali's room, Foster says that Dalton sleepwalks at night, Renai sees the frightening figure of a man in Cali's room, who vanishes when Josh comes and the burglar alarm is repeatedly triggered without a cause. After Renai finds a bloody handprint on Dalton's bed, she questions Josh about the house, but he ignores her. That night, the figure from Cali's room appears outside the bedroom window and attacks Renai. The Lamberts abandon the house and move elsewhere.
In the second house, Renai sees the figure of a dancing boy who leads her to Dalton's room. Josh's mother, Lorraine (Barbara Hershey), has a dream in which a figure in Dalton's room replies "Dalton" when asked what it wanted; at the same time, she notices a monstrous red-faced figure behind Josh. Moments later, Dalton's room is ransacked and Dalton himself is found laying on the floor.
Lorraine calls paranormal investigators Elise Reiner (Lin Shaye), Specs (Leigh Whannell), and Tucker (Angus Sampson). Upon entering, Elise senses a presence in the house and once entering Dalton's room, she sees something on the ceiling, to which Specs draws a demonic, red-faced figure with dark hollow eyes; the same figure Lorraine saw.
Elise explains that Dalton is not in a coma; he was born with the ability to travel mentally to the astral plane. He has traveled too far and become lost in a realm called "The Further", a place inhabited by the tortured souls of the dead. Without his mental presence, Dalton's body appears comatose and spirits can use it to enter the physical world. Josh is skeptical until he realizes that all of Dalton's drawings are of the demonic entity drawn by Specs.
Elise performs a seance to communicate with Dalton, but the demon appears and foully threatens the group. It uses Dalton's body to attack them but is stopped by Elise. She reveals that her acquaintance with Lorraine is decades old, because she previously performed the same service on Josh when he was eight years old (he was terrorized by the parasitic spirit of an old woman). Josh also possesses astral talent; Dalton inherited it from him. Elise tells Josh that the only way to rescue Dalton is to go into the Further himself.
Elise puts Josh in a trance and he is able to project himself to their previous house. He goes to the attic and finds a red door, but is attacked by the mysterious figure that attacked Renai. After defeating him, Josh enters the Demon's lair, where Josh finds Dalton chained to the floor. Josh frees him, but they are caught by the demon; Josh tries to fight it, but they are forced to flee with the demon in pursuit. Returning through the red door, Josh confronts the old woman that haunted him as a child. The old woman dissolves into darkness after Josh shouts at it to leave him alone. When Josh and Dalton return to their bodies they wake up in their new home and the spirits disappear.
As they celebrate the end of their ordeal, Elise is packing up when she senses something and takes a photo of Josh. Josh flies into a violent rage, as he doesn't like to have his picture taken, strangles Elise and flees. Renai picks up the camera, to and sees that the image of Josh resembles a sinister old woman, implying that Josh has been possessed. Josh appears over her shoulder, and she turns around and gasps.