The film opens with Keller Dover (Hugh Jackman) saying a prayer while he and his son Ralph (Dylan Minnette) are stalking a deer in the woods. Ralph shoots the deer and they take it home. Along with Keller's wife Grace (Maria Bello) and his daughter Anna (Erin Gerasimovich), they later go to the home of their friends, the Birch family - Franklin (Terrence Howard), Nancy (Viola Davis), and their daughters Eliza (Zoe Borde) and Joy (Kyla Drew Simmons) - for Thanksgiving dinner. Anna and Joy go outside to play with Ralph and Eliza accompanying them. They find an RV parked down the street and the girls want to play near it, but their older siblings get them away from it. When they get back to the Birch home, Anna asks Grace if she can take Joy to their house so she can help Anna find her red emergency whistle. Grace allows them to go while they hear Franklin play the trumpet poorly.
Hours pass and the girls haven't returned. Keller goes to his house to find the girls, but they aren't there. They also aren't at the Birch home. As it starts pouring rain, Keller becomes frantic as he and Ralph run by the area where the RV was, only it's not there anymore. Keller grabs his phone to call the police.
We meet Detective Loki (Jake Gyllenhaal) in a diner making small talk with a waitress. As he leaves, he is notified about the RV. He and a few other officers find the RV close to a gas station near the woods. The driver of the RV attempts to flee, but he crashes the RV into a tree. Loki steps inside and arrests the man, Alex Jones (Paul Dano). He interrogates Alex at the station, but he hardly speaks in full sentences. Loki visits the home of Alex's aunt Holly (Melissa Leo), with whom he lives. She tells Loki that Alex's parents died in a car accident when he was six. The RV is inspected and there is no evidence of the girls being in there.
Loki goes to the Birch home and Nancy gives him a recent picture of Joy. He then goes to the Dover home and tells Keller and Grace that Alex has the IQ of a 10-year-old and his polygraph test was inconclusive since he couldn't properly answer the questions he was given. Keller gets hostile with Loki and wants him to make sure that they keep Alex in custody until he reveals the girls' whereabouts.
Keller, Franklin, Ralph, and a search crew go through the woods to look for the girls when Keller gets a call from Grace, who tells him that Alex is being released. Keller goes to the police station and attacks Alex, banging his head against a car until he is pulled off by Loki and other officers. Keller gets taken to see Captain Richard O'Malley (Wayne Duvall), and Keller tells both him and Loki that Alex said to him "They didn't cry until I left them," giving Keller further reason to suspect Alex.
Later that evening, Keller drives near Alex's home, where he finds him walking his dog. He sees Alex holding the dog up by its neck, nearly killing it until he lets it down. As he is walking, Keller hears Alex singing "Jingle Bells, Batman Smells", which Anna and Joy were singing right before they disappeared. Keller steps out of the car and holds a gun at Alex, asking him where he heard that song. The next morning, Keller picks Franklin up and brings him to an abandoned apartment building where Keller used to live. He shows Franklin that he is keeping Alex tied to a heater with tape on his mouth.
Keller is seen pounding Alex's already badly bloodied face up to get him to talk and tell him where the girls are. Franklin never tries to stop him and even holds Alex as Keller delivers blow after blow. He then grabs a hammer and threatens to smash Alex's hand on the sink, but he just smashes the sink and breaks a hole in the wall.
Loki continues his investigation of the girls' disappearance by speaking to multiple sex offenders in the area. He goes to the home of a priest named Patrick Dunn (Len Cariou), who is passed out drunk in his home. Loki goes into Dunn's cellar and finds the rotted corpse of a man who was tied to a chair. Loki gets Dunn to talk, and he tells him that this man had confessed to kidnapping 16 children in broad daylight and then later killing them, saying he was waging a war against God, so Dunn killed the man to stop this man from hurting anymore children. Additionally, he finds out about a child by the name of Barry Milland who went missing 26 years earlier. He visits Barry's mother, who says the boy disappeared while playing in the front yard as she took a nap.
That evening, a candlelight vigil is held for the girls as it has been four days since they were last seen. Loki spots a man (David Dastmalchian) suspiciously caressing a teddy bear and then sees the man running. He chases after him and follows him behind a house, but the man jumps Loki and escapes. The next morning, an artist's rendering of the suspect is shown on the news.
Loki goes to a department store after he receives a call from the check-out girl who states that the suspect on the news frequently shops at the store to buy children's clothes and inspect the mannequins. He tells her to call him if he comes by again.
Franklin confesses to Nancy about Keller's kidnapping and torturing of Alex. He takes both of them to the apartment where he's being held, tied to the sink with a bag over his head. Nancy pulls the bag off and sees Alex's horribly swollen and bloodied face. She takes out a picture of Joy and pleads with him to tell her where she is. Alex utters the words "Help me", and she unties him, but he pushes her to the side and tries to break through the window, but Keller and Franklin take him down and tie him back up.
As a last resort, Keller traps Alex in the shower by boarding him in there with wood, saying he will get him to talk by dousing him with either scalding or freezing water. With this, Franklin no longer wants any part in Keller's torturing of Alex.
The suspect is seen walking into the Birch home while Eliza is taking a bath. Franklin and Nancy return home and knock on the bathroom door, but it's locked and there is no response. After a few seconds, Eliza emerges and angrily tells them they should have told her where they were going. Afterwards, the suspect breaks into the Dover home. Grace, who has been spending her time medicated while crying over her daughter, hears a noise. She calls for Ralph and walks into Anna's room, but there is nobody there. She then hears the window to her bedroom open, but she never spots the suspect.
Loki sees Keller walking toward Campello Street, where the apartment is located. Keller notices him and walks into the liquor store and buys himself a drink. He goes over to confront Loki, as it's been six days since the girls' disappearance, and he's growing increasingly worried because he knows Anna is wondering where her father is.
Keller goes home to finally get some rest. He dreams about seeing Anna, who tells him she found her emergency whistle.
While doing some research back at the station, Loki discovers that the apartment on Campello Street belonged to Keller's father William, who was a guard that committed suicide in that house. He drives over there, which alerts Keller, and he pretends to be passed out drunk on the floor. Before he can find Alex upstairs, Loki gets a call from the check-out girl at the department store, who says she spotted the suspect, saying he fled after he noticed her watching him. She gives Loki the man's license plate number.
Loki goes to the suspect's home. He questions him about buying children's clothes, and the man tries to hit Loki and make a run for it, but Loki incapacitates him and arrests him. Loki then smells something rotten and hears flies buzzing. He finds the man's kitchen sink which contains a severed pig's head. He also finds a room with several locked crates spread out on the floor. After placing the suspect in the car, he grabs a crowbar and runs back into the house to open them. In nearly every crate, he finds blood-stained children's clothes, along with dozens of snakes. He has Franklin, Nancy, and Keller go to the station to identify pictures of the blood-stained clothing. Franklin and Nancy identify Joy's clothes while Keller sees a sock with a bunny picture, saying it's Anna's.
The suspect is identified as Bob Taylor. He is seen drawing what is supposed to be a map of the girls' location, but it appears to be a maze. Loki goes into the interrogation room and attacks Taylor, smashing his face against the table. He is grabbed by two officers as Taylor swipes Loki's gun, puts it in his own mouth, and pulls the trigger. After Taylor's body is taken away, Loki frustratedly throws everything off his desk and smashes his keyboard. He then notices a picture of the corpse he found at Father Dunn's home. The man was wearing a pendant with a maze similar to what Taylor was drawing earlier.
Keller becomes remorseful for what he's done to Alex. Alex then starts muttering about a maze, but doesn't say much else. Keller later goes to Holly's home to apologize for attacking Alex, and then subtly drops hints about a maze, to which Holly doesn't respond. She does mention that her husband used to own numerous snakes. He then notices a newspaper of Taylor's suicide, which Holly says she thought he knew about.
Loki goes back to Taylor's home which is being investigated. In the back are two children's mannequins buried in the ground with their faces caved in. The blood that was tested turned out to be pig's blood, and the clothes presumably came from when Taylor broke into the girls' homes the other night. Loki speaks to another detective, who has found a book called "Finding The Invisible Man". It is mentioned that Taylor was abducted as a child, and he believed that through the drawings of the mazes, he could identify his kidnapper. As he looks through his notes, Loki reads one that says "Windows - open?" He goes to a nearby house and finds the companion to Anna's sock.
Grace gets a phone call at home, which pulls her right out of bed. As Keller gets home, she runs out to tell him that Joy has been found, but not Anna. They run to the hospital to find Franklin and Nancy next to Joy's bed. She has been drugged and is half-conscious. Keller starts asking Joy if she knows where Anna is, but he is told to not do this right now. Grace simply asks Joy if she can nod that Anna is alive. It's shown through a flashback that the girls were kept in a room with the Invisible Man book next to them with a note that said "Finish the mazes and you can leave." The girls tried to escape, but Anna was held back, and Joy was rescued. Joy comes to and tells Keller, "You were there. They put tape on her mouth." Keller knows what she means, and he rushes out of the hospital. Loki chases after him, thinking he knows where he's going. Loki drives to the apartment and hears Alex moaning in the shower, but he doesn't find Keller.
Keller goes back to Holly's home. When his back is turned, she pulls out a gun and holds it at him. She forces him to handcuff himself and to get rid of his phone and car keys. She also makes him drink some kind of drugged liquid and forces him outside. Through this, she reveals that she and her husband (the same man who Father Dunn killed) had been kidnapping children to spite God after their own son died of cancer. Among these children were Alex and Bob Taylor. Holly makes Keller pull a car back to show a closed pit where she had kept Anna and Joy. She shoots Keller in the leg and makes him jump in there. She seals it as Keller finds Anna's whistle. He then prays, asking God to protect Anna and asking for repentance for his crimes.
Loki drives to Holly's home, just as she goes into a room where a barely conscious Anna is lying. He enters the house and finds a picture of Holly's husband, who was wearing the maze pendant, thereby confirming his suspicion. He finds Holly injecting a needle into Anna's arm, and he orders her to show her hands. Holly pulls her gun out and shoots Loki in the side of the head, but he shoots Holly dead. He grabs Anna and rushes her to the hospital, making it in time as the blood from his gunshot wound is nearly blinding him.
A while later, Loki reads a newspaper stating that Alex, who was really Barry Milland, has been reunited with his family. Grace wheels Anna into Loki's hospital room to thank him for rescuing her. Nancy, Eliza, and Joy are also there, and they take Anna out as Grace stays to talk to Loki. She thinks Keller has gone on the run for what he did to Alex, and she knows he may go to jail if he's found. Loki assures her that he will find him.
That evening, an investigating team tries to excavate around Holly's home to find Keller, but the ground is too frozen for them to dig deeper. They decide it's time to call it a night. As Loki stands there, he hears the faint sound of Keller blowing Anna's whistle.
You can send in your spoiler to other movies by going here.