The novel opens as a group of friends sit around the fireplace of an old house in 1890s England, telling ghost stories. A man named Griffin tells a ghost story featuring a little boy, and a man named Douglas proposes to tell a true story about two children. He keeps the manuscript of the story locked in a drawer at home in London. It was written by a woman, now dead, who was once his younger sister's governess and with whom he was in love. Three days later, the manuscript arrives by the post, and Douglas begins his story.
Before reading the manuscript, Douglas explains that the young woman had interviewed for her first governess job with a gentleman on London's Harley Street. She was quite smitten with him, and he was able to convince her to accept the position of governess to his niece and nephew at his country house Bly. The previous governess has died and the boy is now away at school and the girl in the care of the housekeper. There is one condition: She cannot contact him at any time and must deal with all problems herself.
The governess arrives at Bly, where she is met by a beautiful little girl, eight-year-old Flora, and the housekeeper Mrs. Grose. The boy, ten-year-old Miles, will return from school in a few days. The night before his arrival, the governess receives a letter from the headmaster of his school refusing to allow Miles to return to school after the summer holiday. Mrs. Grose assures that Miles is too good a boy to have done anything to deserve expulsion, and the governess agrees to meet the boy before drawing any conclusions.
Upon his arrival, the governess finds Miles to be just as beautiful and angelic as his sister and decides to do nothing in response to the letter. For a time, the governess is very happy. The children are excellent students. One evening, as she strolls around the grounds, she images their uncle coming upon her and smiling his approval at her for succeeding at her job. At just that moment, the governess looks up and sees a man in one of the towers of the house. She at first thinks it is the uncle but then realizes it is a stranger. The man stares at her until she turns away.
The governess is worried after this but guesses that it must have been a traveler who trespassed in the tower for the view it provided. She instead concentrates on the children, until one rainy afternoon when she goes into the dining room to look for her gloves. Outside the window, she sees the same man staring at her, but when she runs out of the house to confront him, he is gone. She describes the man - curly red hair, red whiskers, sharp eyes - to Mrs. Grose, and the housekeeper says that the man is Peter Quint, the uncle's former valet. Quint is dead.
The governess believes that Quint was not looking for her but for Miles and finds it odd that Miles has never mentioned him. Mrs. Grose tells her that Quint was "too free" with Miles when he was at Bly and that the two spent a great deal of time together. The governess pledges that she will protect the children.
One afternoon, the governess sits with Flora as she plays by the lake. She becomes aware that someone else is present across the lake. She rushes to tell Mrs. Grose what has happened. A woman appeared across the lake, and she is certain that Flora knew she was there but said nothing. The governess is convinced that the woman was Miss Jessel, the governess who died. Mrs. Grose tells her that Miss Jessel had an inappropriate relationship with Quint and then went away, though she does not know the exact circumstances of her death. The governess believes that the children are lost to these ghosts.
The governess, knowing about Miles's friendship with Quint, comes to believe that he did something wicked that resulted in his expulsion from school. She thinks that the children are communing with the ghosts behind her back and tries to keep them in her sight at all times.
One night, the governess is up late reading when she hears something in the hallway. She sees Quint standing halfway up the stairs. He stares at her, then turns and walks away. When she gets back to her room, where Flora also sleeps, the little girl is missing. She finds her behind the curtain, looking out the window. Flora says she thought someone was outside but saw no one.
Another night, the governess sees a woman sitting at the bottom of the stairs, her head in her hands, as if she is crying. Several nights later, the governess wakes up and sees that Flora is behind the curtain, looking out the window again. She slips out into the hall and stands outside Miles room, listening at his door to hear if he is awake, before choosing an empty bedroom from which to look out onto the lawn. There, outside, is Miles.
The next day, the governess tells Mrs. Grose what happened. When she brought Miles back to his room and asked why he was outside, he told her he arranged things with Flora so that the governess would think him, for a change, bad. The governess is even more certain that the children meet with the ghosts in secret. She thinks Quint and Miss Jessel want to possess the children and lead them to their deaths. When Mrs. Grose suggests contacting the uncle, the governess threatens to leave Bly if she were to do so.
The governess believes that the ghosts are sometimes present and visible only to Miles and Flora. The children write letters which are never mailed to their uncle and talk of his coming to visit, and the governess sees evidence of his trust in her in his failure to visit.
Walking to church one Sunday, Miles asks the governess when he is going back to school. He wants to know if his uncle thinks what the governess does about keeping him out of school and says that he will do something to make his uncle come visit. The governess is so upset she does not enter the church and instead rushes back to the house, planning to leave. She sits on the stairs, crying, and then realizes that she had seen Miss Jessel sitting in the same spot. She then goes in the schoolroom where she sees Miss Jessel sitting at her own table, staring at her as if she is the intruder.
The governess decides to stay, and when Mrs. Grose returns, she tells her that Miss Jessel told her that she suffers the torments of hell and that she wants Flora to suffer them with her. The governess decides to write to the uncle.
That night, she talks with Miles about going to a new school and asks about things that happened at Bly and at school before. Suddenly, the candle blows out, and Miles says he did it.
The governess writes the letter but keeps it in her pocket the next day, planning to send it later. Miles offers to play the piano for her, and while he does, she loses track of time. When he finishes, she realizes Flora is missing. Mrs. Grose doesn't know where she is either. The governess leaves the letter on the table for a servant named Luke to take, and the two women rush to the lake to look for Flora.
They find the boat missing. Flora has take it - with Miss Jessel's help, the governess believes - across the lake. They walk around to find her. The governess demands the child tell her where Miss Jessel is, and suddenly Miss Jessel appears on the other side of the lake. The governess points her out, but Mrs. Grose cannot see her. Flora only looks at the governess who demands she admit that Miss Jessel is there. Finally, Mrs. Grose takes the distraught child home, and the governess collapses in tears on the bank. When she comes home, Miles sits with her by the fire and says nothing.
The next morning, Mrs. Grose tells her that Flora is feverish and is terrified of seeing the governess, of whom she says awful things. She also says that the letter never went to the uncle, and Miles must have taken it. The governess sends Mrs. Grose and Flora by coach to the uncle immediately, and plans to stay alone with Miles.
Miles is gone, wandering the grounds all day. Finally, the he and the governess eat dinner in the dining room, where she once saw Quint through the window. The governess asks Miles to tell her what is on his mind, but he says that he wants to talk to Luke first. Suddenly, Peter Quint appears in the window.
The governess struggles to keep Miles's back to the window and demands to know if he took the letter. When he says he did, she demands to know what he did at school to get expelled, and he says that he "said things" to his friends which they passed on to their friends. The governess shrieks at Quint in the window, and tells Miles he's at the window. Miles asks, "It's he?" and when the governess demands to know which "he," Miles shouts "Peter Quint - you devil!," then yells "Where?" The governess tries to show Miles Quint in the window, then grasps the boy in her arms. After a few moments, she realizes his heart has stopped beating.