The story begins as Jack (usually referred in the novel as 'the man Jack') has murdered all the members of a family except for the toddler upstairs. Unknown to him, the toddler has climbed out of his crib to explore. The toddler crawls out of the house and up a hill to a graveyard where the ghosts find him. They discuss whether to keep him until the Lady on the Grey (implied to be Death) appears and suggests that the baby should be kept. The ghosts accept and Mrs. Owens (the ghost who first discovered the baby) and her husband, Mr. Owens, become the foster parents. The baby is named Nobody Owens and is granted the Freedom of the Graveyard. Silas accepts the duty of providing for Nobody. The man Jack is persuaded that the toddler has crawled down the hill, and he eventually loses the trail.
The bulk of the book is about Nobody's (often called Bod) adventures in and out of the graveyard as he grows up. As a boy, he befriends a girl called Scarlett Perkins and she is eventually convinced by her mother that he is her imaginary friend. It is with her that Bod discovers a creature called the Sleer, who has been waiting for thousands of years for his "Master" to come and reclaim him. Scarlett's parents believe she has gone missing during this adventure, and when she returns consequently decide to move the family to Scotland. He is once captured by the Ghouls and then rescued by Miss Lupescu, discovering she is a Hound of God, i.e. a werewolf. Bod befriends Liza Hempstock the witch and, through a short adventure that includes being kidnapped by a greedy pawnshop owner, finds a gravestone for her. Once, he tries to attend regular primary school with other human children but it ends in a disaster as two bullies make it impossible for him to be normal. Throughout his adventures Bod learns supernatural abilities such as Fading, Haunting, and Dream Walking, taught by his loving graveyard parents, his ghost teacher Mr Pennyworth and Silas.
Years pass by, and it is revealed that Jack has still been searching for the toddler that he had failed to kill. He must complete his assignment or his secret society, the Jacks of All Trades, will be destroyed by the surviving boy.
On Bod's 14th year at the graveyard Silas and Miss Lupescu both leave to attend some business. Meanwhile, Scarlett and her mother come back to the town as her parents have divorced and she and Bod reunite. Scarlett has also made friends with a historian called Mr Frost who is living in a house not too far from the graveyard. Researching the murder of Bod's family, Scarlett learns that the historian lives in the house that Bod once lived in. Bod visits the house, in an effort to learn more about his family. When showing Bod the room he lived in as a baby, Mr Frost reveals that he actually is the man Jack; Jack Frost is his full, true name.
Bod is attacked by the man Jack and four other members of the Order. Bod and Scarlett escape to the graveyard where Bod is able to defeat each Jack separately, except for Jack Frost. Jack Frost takes Scarlett captive in the chamber of the Sleer but is then tricked by Bod into saying "Yes, I am your master" to the Sleer. The Sleer engulfs Jack Frost in an "embrace" and they disappear into the wall. Silas returns and it is revealed that he, Miss Lupescu and two other supernatural beings (the ifrit Haroun and the winged mummy Kandar) who comprise the Honour Guard were fighting against the rest of the Jacks of All Trades, thus destroying the secret society completely. Though they succeded in destroying the society, Miss Lupescu was killed in battle, to Silas and Bod's great sorrow.
Scarlett is shocked and appalled by the events of the night and Bod's questionable actions in the course of killing Jack Frost. Silas suggests the best course is to remove most of her memories of Bod and what happened that night. Bod argues with Silas, until Scarlet states that it is her choice what happens, and she agrees to Silas' plan as she wants to go home. Silas uses his power of suggestion to convince Scarlet and her mother to return to Glasgow.
In the final chapter of the book, a now grown Bod is losing the Freedom of the Graveyard and even his ability to see ghosts. At the end of the book, Silas gives Bod a passport with the name "Nobody Owens" and Bod leaves the graveyard to embark on a new life.