Christopher John Francis Boone a fifteen-year-old boy with an autism spectrum condition, lives with his father, who has told him that his mother, Judy, died two years ago. The boy discovers the dead body of the neighbour's dog, Wellington, speared by a garden fork. Mrs Shears, the dog's owner, calls the police, and Christopher comes under suspicion. When a policeman touches him, he hits the policeman, and is arrested, then released with a police caution. He decides to investigate the dog's death, despite his father's orders to stay out of other people's business. He is severely limited by his fears and difficulties when interpreting the world around him. Throughout his adventures, Christopher records his experiences in a book, which he calls a "murder mystery novel". During his investigation, Christopher meets people whom he has never before encountered, even though they live on the same street, including the elderly Mrs Alexander, who informs Christopher that his mother had an affair with Mr Shears and had been with him for a long time.
Christopher's father, Ed, discovers the book and confiscates it after a brief fight with the boy. While searching for the confiscated book, Christopher uncovers a trove of letters which his mother wrote to him, dated after her supposed death, which his father has also hidden. He is so shocked by his father lying about his mother's death that he is unable to move, curls up on the bed, vomits and groans for several hours until his father returns home. Ed realizes that Christopher has read the letters and cleans him up. He then confesses that he had indeed lied about Judy's death and also that it was he who killed Wellington, stating that it was a mistake resulting from his anger after a heated argument with Mrs Shears. Christopher, having lost all trust in his father and fearing that Ed might try to kill him since he had already killed the dog, decides to live with his mother and runs away. He remembers his mother's address from the letters and embarks on an adventurous trip to London, where his mother lives with Mr Shears.
After a long and event-filled journey, evading policemen and feeling ill from the overwhelmingly large amount of information and stimuli from the trains and crowds around him, he finally finds his way to his mother and Mr Shears's home, and waits outside until they arrive. Judy is delighted that Christopher has come to her; she is upset that Ed told Christopher that she was dead. Mr Shears does not want Christopher living with them and never did. Very soon after arriving, Christopher wants to return to Swindon in order to take his mathematics A-level. His mother leaves Mr Shears, their relationship having broken down because of their conflict about Christopher and Mr Shears's rejection of Christopher. Judy then moves into a rented room in Swindon. After an argument with Ed, she agrees to let Ed meet Christopher for daily brief visits. Christopher remains terrified of his father and makes repeated attempts to prevent him from talking. He hopes Ed will be imprisoned for killing Wellington, although his mother explains that for this to happen, Mrs Shears would have to press charges.
The story ends with Ed getting Christopher a Golden Retriever puppy, whom Christopher gets to name, and promising that he will rebuild trust with Christopher slowly, "no matter how long it takes". Christopher asserts that he will take further A-level exams and attend university. He completes his mathematics A-level with top grades despite having eaten and slept very little. Earlier in the story he talks about wanting to become an astronaut, but at the end he declares that his goal is to become a scientist. The book ends with Christopher optimistic about his future, having solved the mystery of the murdered dog, gone to London on his own, found his mother, written a book about his adventures, and achieved an A in his A-level maths exam.