When You Reach Me follows a sixth-grade protagonist, Miranda. She lives with her single mother who has a kindhearted boyfriend, Richard. Miranda's best friend Sal, whom she knew since she was a small child, had recently started ignoring Miranda after he had been punched in the stomach by another boy, Marcus.
A homeless man lives on the corner of Miranda's street. She calls him the "laughing man" for his tendency to laugh without cause. Miranda notices that he always utters the words "book bag pocket shoe." The phrase refers to the order and place he will send Miranda notes—her library book, a bread bag, her coat pocket and Richard's shoe. The first three notes instruct Miranda to write a letter describing the future events. The notes, whose writer claims to be coming to Miranda's time to save a life, offer three signs of the truth of the messages. As the plot develops, the proofs come true, and Miranda is intrigued.
Miranda and her new friends, Annemarie and Colin find a sandwich shop on the corner, wondering if they can get paid for a job there. The owner, Jimmy, agrees, but he does not wish to pay them with money instead he intends to give a free pop and a sandwich each day of their work. Miranda, Annemarie, and Colin discover a Fred Flintstone bank in the back of sandwich shop. Colin, wanting to see more of the bank, is pulled way by Annemarie insisting that Jimmy could find them. The next day, Jimmy fires the three workers, thinking that one of them stole the Flintstone bank, when it was actually Marcus who stole it. The workers write a card, give it to Jimmy and insist that they did not steal the bank. Jimmy believes them and let them work at the sandwich shop. He then tells them that he figured out who stole the bank. He thinks that it is Julia, a classmate in their class, and a best friend to Annemarie. He thinks she did it because she is African American. This upsets Annemarie greatly and she immediately quits her job.
At school, Julia starts shouting at Miranda for letting Annemarie drink soda and eat sandwiches. Julia explains that because Annemarie is epileptic she has to eat a special diet. Miranda explains that she didn't know any of that. Colin is later hanging out with Sal. Colin then asks Miranda if she wants to hang out. Miranda declines saying that her mom is sick. Later on, someone taps on her door which scares her because she doesn't know anyone that knocks like that. She looks though the peep hole and sees Colin. She opens the door and he looks at her then kisses her. She then kisses him back. Colin smiles and then runs off.
In a later scene, Marcus encounters Sal. Marcus wants to apologize for his misbehavior, and chases Sal when he flees. Sal runs onto a street right ahead of an oncoming truck. Before the truck can hit Sal, the laughing man kicks Sal out of the way, sacrificing his own life for Sal's. Miranda finds the fourth note in Richard's shoe and learns that the laughing man came from the future to save Sal's life. The note asks Miranda to prepare a chronicle of recent events and deliver it by hand. Miranda obeys this command.
Miranda's mom is expected to appear on the $20,000 Pyramid . In hopes of winning the money and having a better life, Miranda and her mom's boyfriend Richard prep her for the show. Miranda and Sal are friends again. While her mother is on-stage, Miranda reminisces about a conversation with Marcus about how no one would recognize a time-traveler from a different age. She suddenly realizes that the laughing man is an older incarnation of Marcus, who has come from the future to save Sal's life. He needed to deliver the notes to the young Marcus through Miranda, who is conveniently her friend. Later on Miranda goes to the mailbox where the laughing man (Marcus) slept under she finds a picture and sees an older version of Julia smiling happily. The novel ends as Miranda reflects on the events in an epilogue.