The film starts in 1988 at the end of the third film. A supernatural entity bends Dennis backwards and kills him. Grandma Lois (Hallie Foote) guides young Katie (Chloe Csengery) and Kristi (Jessica Tyler Brown) upstairs where they meet with a guy named Kent (Don McManus), whom Lois says will be the girls' teacher. Kent tells the girls that he is going to help them with something that will benefit them in the future.
We jump to 2013 in Santa Rosa, CA at the Fleege home. Dad Ryan (Chris J. Murray) is with his daughter Leila (Ivy George) as they wait for Ryan's brother Mike (Dan Gill) to show up. Mike is staying with his brother after going through a pretty bad break-up. Ryan's wife Emily (Brit Shaw) doesn't like the idea of Mike staying for too long. Joining them is a friend named Skyler (Olivia Taylor Dudley).
While going through some stuff, Ryan and Mike come across a camera and some old tapes. They play one of the tapes and see Katie and Kristi as kids while Mike records the events with the camera. Another tape shows the girls in a room with Kent asking Kristi what she sees. Based on what she describes, Ryan is a bit creeped out to notice that Kristi is describing Leila's room. Kent asks Kristi if she sees "him". Kristi strains and says yes before a skeletal blue flash goes over her face and the power in the house go out.
Mike records the family as Leila puts the angel on top of the Christmas tree. When Ryan gets ahold of the camera, he sees that it's picking up particles in the air, and it sounds like he's underwater as he walks past it.
Leila starts acting strangely. Ryan catches her with her bleeding hand pressed against the bathroom mirror while saying something backwards. When they leave, the handprint fades into the mirror before something cracks it. When Ryan and Skyler review the footage, they play the tape backwards and see that Leila is saying "Bloody Mary".
Ryan starts to leave cameras in the living room and Leila's room. On Night #1, a dark spirit forms next to Leila's bedside. She wakes up and talks to it like a friend. When asked about who her new friend is, Leila calls it "Toby". Ryan walks into the room and Tobi vanishes.
Ryan and Mike bring Skyler in to watch the tapes. The guys note how Katie and Kristi are seen with their mom and Dennis in some videos, but the videos of them from a few years later only feature Lois and Kent, and how cult-like Kent's teachings appear to be.
Mike and Skyler are outside with the camera. They notice a ripple in the pool. A dark cloud appears to jump from the pool and go into the woods. There, they find Leila alone. It becomes evident that Toby's presence is only ever noticeable around Leila.
Night #2 - Ryan and Mike are awake as they try to catch new footage. Ryan goes into Leila's room and watches her sleep. From the window, an entity with a slightly noticeable demonic face appears and flies toward Ryan, frightening him.
The guys review the footage and get a better look at the demon's face. They later go into Leila's room and see that she's drawn weird symbols on her bedroom wall, which Ryan recognizes from some papers he found with the same symbols.
Night #3 - Leila wakes up and follows Toby to the living room. She turns on the gas and leaves it going for a while until Emily comes downstairs and turns it off. She sends Leila to her room, after which the gas turns on by itself again. Moments later, the angel falls off the tree with a loud thud.
Concerned about Leila's behavior, Ryan and Emily call in Father Todd (Michael Krawic). The priest goes into Leila's room and tries to talk to her. He rubs holy water over her forehead. Leila grins slightly but stays still as Todd asks more questions. After a brief moment, Leila growls and lunges at Todd, throwing him to the ground as her parents try to pull her off of him.
Night #4 - Ryan and Mike watch another Katie/Kristi video. Kristi is still trying to describe her visions to Kent. What she describes is eerily similar to the room in which the brothers are standing in. What's more, Kristi says she sees two brothers. Leila then comes in, complaining that she can't sleep. Ryan picks her up, and she sneezes. Mike then catches Katie and Kristi saying "bless you" in the video.
The adults dig a little deeper into the events surrounding the tapes and the girls. Ryan reads up on Hunter Rey (Kristi's son), who appeared in one of the videos from 1992, despite not being born until 2006 on the exact same day as Leila. Emily reads about a cult called The Midwives that uses the blood of two firstborns in order to bring something into the world. They also see some drawings of a creature with multiple eyes, something that Leila has made drawings of.
Night #5 - A crack forms in the wall in Leila's room. It opens up a tunnel that she climbs through and stays in for hours. The adults notice she's nowhere to be found and scramble to find her. Leila later re-emerges in her room, seemingly dazed out. She says that "he" is going to take her away.
The adults worry about Leila as she grows increasingly detached from them. They forbid her to be friends with Toby, but Leila won't listen.
Night #6 - The adults stay awake and close to Leila. Downstairs, Ryan picks up Toby forming around Mike. They hide in the kitchen as they can see Toby through the camera, stomping and making troublesome noises while growling menacingly.
Deciding that enough is enough, Ryan and Emily call Father Todd to get rid of Toby once and for all. He says that since Leila is not technically possessed, they aren't doing an exorcism, but an extermination. That night, the adults soak some sheets in warm water and draw a circle with a star in the middle on the floor that everyone stands in. They get Leila and prepare for the cleansing. Toby starts to shake the house like an earthquake. Mike turns on the night vision as the adults jump out of the circle as Toby lunges toward them, where we finally get a look at his demonic face. He becomes trapped in the circle as the adults throw the sheets on him. He rises as a tall figure and stomps toward them until Todd speaks an incantation that supposedly vanquishes Toby. Everyone thinks it's over, and Leila appears to snap back to normal...until Skyler's neck starts twisting and she regurgitates an acidic black bile that burns Mike to death. Leila runs away. Her parents chase after her, but Toby puts his arm through Ryan's chest, killing him. Emily then finds the tunnel in Leila's wall and follows her through it.
Emily finds herself in the basement of Katie and Kristi's old home back in 1992. She sees blood dripping from the ceiling and she fears the worst. Emily then comes face-to-face with Katie and Kristi, whose eyes are both blacked out. Katie tells Emily it's too late and that "he's" real now. Emily finds Leila, grinning with her hand bleeding. A stomping noise is heard, and Emily sees Toby, now having finally taken on a physical form of his own. She pleads with Toby to spare her since he got what he wanted, but he grabs her by the throat and snaps her neck.
The film (and series) ends with Leila taking Toby's hand and walking away off-screen.