Oregon, 1974. A young girl carrying a Polaroid camera follows a strange voice through her house on her birthday and meets an erratic man in pale makeup. We do not see what happens next, only that this family becomes the first victims of a killer the FBI will later call Longlegs.
Twenty years later, rookie FBI agent Lee Harker is assigned by her supervisor, Agent William Carter, to a string of murder-suicides across Oregon. In every case, a father kills his entire family and then himself, leaving behind a letter covered in Satanic symbols, signed "Longlegs" in handwriting that belongs to no one in the house. No trace of an outsider is ever found. Lee, who has an unexplained clairvoyant intuition, begins to decode the letters.
She discovers the pattern: every family had a 9-year-old daughter born on the 14th of the month, and every massacre happened within six days of that girl's birthday. Plotted on a calendar, the dates form an occult triangle, with one date missing. Then the case turns personal - Lee receives a coded birthday card from Longlegs himself, warning her that if she reveals where it came from, her mother Ruth will be killed.
A clue leads Lee and Carter to a doll with a strange high-energy metal orb hidden inside its head. At a mental hospital, they meet Carrie Anne Camera, the only person to ever survive Longlegs, who says someone using Lee's name visited her before. Carter digs into Lee's past and finds that Ruth once filed a police report about a strange man approaching Lee the day before her 9th birthday. Sent to question her mother, Lee finds a childhood Polaroid that reveals the truth: the pale man from the opening scene is Longlegs, and he visited her on her own birthday.
The photo leads to the arrest of Dale Ferdinand Kobble, known as Longlegs. In the interrogation room, he confesses in a sing-song voice, says he serves "the man downstairs," and hints that someone close to Lee helped him. Then he kills himself, repeatedly smashing his own face against the metal table. Soon after, Lee learns Carrie Anne has died by suicide.
Agent Browning drives Lee to Ruth's house. Inside, Lee searches while Browning waits outside - but Ruth approaches the car and shoots Browning dead. Then Ruth destroys a doll made in young Lee's image, and Lee collapses. In a vision, the whole truth is revealed: Longlegs visited Lee on her 9th birthday, and Ruth begged for her daughter's life. He agreed, on one condition. Ruth would serve him. He moved into the Harker basement, built Satanic dolls carrying the orb, and Ruth - posing as a nun - delivered them to families, where they possessed the fathers and drove them to slaughter their own. A doll shaped like young Lee sat in Lee's home the entire time, suppressing her memories and bending her will.
Lee wakes in the basement and answers a ringing phone. A demonic voice tells her the final point of the triangle is Ruby Carter's 9th birthday party - happening right now. Lee races to the Carter home, but Ruth has already delivered the doll, and the family is possessed. William Carter murders his wife Anna before Lee is forced to shoot him to save Ruby. Then Ruth lunges at Ruby with a dagger, and Lee kills her own mother. Lee tries to destroy the doll, but her revolver is empty. She sets the gun down, tells Ruby they have to go - and both of them stand frozen, staring at the doll.
The film closes in Longlegs' empty cell, where his presence lingers. He gleefully sings "Happy Birthday" to Lee Harker, whispers "Hail, Satan," and blows a kiss.