Kafka Tamura sits in his father’s study. Kafka has decided that he will run away from his home in Tokyo on his fifteenth birthday. Crow (an imagined persona whom Kafka consults for advice when he finds himself in stressful situations) advises Kafka to be tough and strong. Feeling as if he is preparing for a journey that will change him forever, Kafka packs a knife, some money, and a picture of himself and his older sister on the beach from when Kafka was young. Both his older sister and his mother left the family when Kafka was just four, so this is the only memory he has of them. Kafka has spent years building up his physical and mental strength, training to be able to escape his cruel father and survive as a runaway. But he fears that no matter how far he runs, he will never be able to escape a dark omen that follows him everywhere.
With only a backpack of possessions, Kafka gets on a bus bound for Shikoku in Western Japan. At a rest stop on the journey, Kafka meets a girl named Sakura, who is a few years older than him. He is attracted to her, but he worries, as he does with all women Sakura’s age, that she could be his long-lost sister. They both agree that chance encounters are important, and possibly even the result of fate. When they arrive in the town of Takamatsu, Sakura gives Kafka her phone number. Kafka, unsure of what to do, visits the Komura Memorial library, where he meets Oshima, a well-dressed young librarian, and Miss Saeki, an extremely elegant, middle-aged woman who runs the library. Kafka is struck by the thought that she could be his mother. Over the next week, Kafka falls into a lonely routine, spending mornings at the gym and afternoons reading in the library. He and Oshima strike up a friendship.
Meanwhile, a series of declassified U.S. Army documents from World War II tell the story of a mysterious incident. Setsuko Okamochi, an elementary school teacher in the countryside, took a group of children to look for mushrooms on a hill. Suddenly, all the children collapsed. The children were unconscious, but their eyes moved back and forth rapidly, almost as if their minds were experiencing something independently of their bodies. Setsuko ran to get help, but a local doctor found himself completely at a loss. Soon, the children began to wake up on their own, apparently fine and without any memory of the incident. All the children woke up except for one: Satoru Nakata, a studious young boy who had been evacuated from Tokyo to the countryside, remained in a coma for weeks. Interviews with doctors and psychologists show that Nakata’s case baffled them. Finally, Nakata, too, woke up on his own, but unlike the other children, he had lost his memory entirely. He had even lost the ability to read or write, skills he never regained. Although the official record ends there, many years later, Setsuko wrote in a letter that she believed she was responsible for the incident.
In the present day, Nakata, now an old man, sits in a vacant lot in Tokyo chatting with a black cat. Although he lost his memory and literacy in the childhood incident, Nakata gained the special ability to talk to cats, a skill he now leverages in his part-time job searching for lost house cats. Right now, he’s on the hunt for a cat named Goma. A slightly addled cat named Kawamura and a refined Siamese cat named Mimi help Nakata trace Goma to the grassy lot where she was last seen, and Nakata waits there, hoping she will reappear. Other cats warn him that an evil man has been showing up there. Before long, a big, fierce dog shows up at the lot. Nakata follows the dog to the home of Johnnie Walker—a mysterious man who dresses like the logo for Johnnie Walker brand whisky. Johnnie Walker tells Nakata that he can help him find Goma, but only if Nakata will help him, as well—by killing him. Johnnie Walker reveals that he kills cats in order to collect their souls, which he is using to build a mystical flute. Unless Nakata kills Johnnie Walker, he will kill Goma and Mimi. With mounting horror, Nakata watches as Johnnie Walker dismembers three other cats before he can no longer stand it. He stabs Johnnie Walker with a kitchen knife and gathers up Goma and Mimi, whom Johnnie Walker was about to kill. Nakata returns Goma to her family and tries to turn himself in to the police, who think he is crazy. He leaves Tokyo the next day.
Back in Takamatsu, Kafka wakes up outside with blood on his shirt and no memory of the past few hours. Panicked, he calls Sakura and goes to her apartment, where he tells her about his family. He spends the night there, and she makes him orgasm while they talk about his sister. The next day, Kafka heads to the library and tells Oshima that he needs somewhere to stay. Oshima says that he will ask Miss Saeki if Kafka can stay in the library, and, in the meantime, takes him to a remote cabin in the woods. On the drive, Oshima reveals that he suffers from hemophilia and as a result often thinks about his own death, using music as a distraction. Kafka spends the next couple of days venturing into the labyrinth-like woods around the cabin, talking with Crow, and making peace with the overwhelming solitude of the forest. On the drive back to the library, Oshima tells Kafka about Miss Saeki’s past. Her childhood sweetheart died when they were both very young, and ever since then Miss Saeki has been distant and listless. She refuses to listen to “Kafka on the Shore,” a song she wrote for her boyfriend when they were young. The next day, two women visit the library and complain that it is not comfortable for female guests, accusing Oshima of sexism. He reveals that he is a gay, transgender man.
Meanwhile, Nakata hitchhikes west, getting a series of rides on different trucks. Eventually, he meets Hoshino, a young man who cruises through life seeking out only short-term relationships and new Hawaiian shirts every few weeks. Hoshino finds himself drawn to Nakata and takes a few days off work to help him get to Takamatsu—a location Hoshino feels drawn to, though he isn’t sure why. Nakata says they must find the “entrance stone,” a mysterious white stone with magical properties that only Nakata knows about. After days searching in library books and tourist sites to no avail, Hoshino is approached by an old man who calls himself (and dresses like) Colonel Sanders. Colonel Sanders takes Hoshino to a Shinto shrine, where he finds the entrance stone. He then lugs the stone back to Nakata. They spend some time trying to determine what to do, and then Nakata says they must flip the stone over in order to open an entrance to another world. With tremendous effort—the stone has become supernaturally heavy—Hoshino does so. Soon, he decides that his relationship with Nakata is more important than returning to work.
At the library, Oshima shows Kafka an article saying that a famous sculptor—Kafka’s father—has been stabbed to death. Although he was far away at the time of the murder, Kafka feels he was responsible. He tells Oshima about the omen that drove him away from home: echoing the Oedipal myth, Kafka’s father prophesized that Kafka would kill him and sleep with his mother and sister. Over the next few nights, a ghost resembling a teenaged version of Miss Saeki appears in Kafka’s room. Intrigued, he listens to the song “Kafka on the Shore” and begins to believe he and Miss Saeki are being drawn together. He also begins to suspect more strongly that Miss Saeki is his mother, although she denies it. Soon, Kafka and the real Miss Saeki begin to have sex. She feels as if she is making up for the time she lost with her boyfriend, while he wants to make up for his damaged childhood.
As the police intensify their search for Kafka’s father’s killer, Hoshino and Nakata relocate to an apartment provided by Colonel Sanders. They begin driving around the city as they try to determine what to do next. Oshima, also wary of the intensifying search (and the relationship between Kafka and Miss Saeki), brings Kafka back to the cabin. Kafka has a dream about raping Sakura which fills him with guilt. Kafka is intensely lonely and feels trapped by his father’s prophecy. Hoping to escape, or face death, he ventures into the dark woods. Eventually, he comes upon two soldiers in World War II uniforms who say they will take Kafka to a mysterious entrance. He follows them to a steep ravine with a collection of small cabins, much like Oshima’s cabin, in a clearing at the bottom. The soldiers leave him in one of the houses.
After days of aimless driving, Nakata and Hoshino stumble upon the Komura memorial library, and Nakata feels pulled to go inside. There, he talks with Miss Saeki. They feel an immediate connection. She tells him that she feels trapped within memories of her past, while he says that he feels equally trapped by his lack of memory. Miss Saeki entrusts Nakata with a stack of files in which she has written her life story. At her request, Hoshino and Nakata burn the files without reading them. When Oshima goes to Miss Saeki’s office at the end of the day, he finds her face down on her desk, dead. When Hoshino and Nakata return to the apartment, Nakata, too, dies in his sleep, leaving Hoshino to puzzle over what to do with the entrance stone. After a couple of days, a black cat arrives and tells Hoshino that he will need to kill something that will attempt to get through the entrance. Sure enough, a long, pale, snake-like creature emerges from Nakata’s dead body and begins to make its way to the stone. Hoshino tries unsuccessfully to kill it and realizes he must close the entrance by flipping the stone over. Once again, it takes nearly all his strength, but he is successful. He is then able to kill the creature. Vowing to hold onto Nakata’s memory, Hoshino heads out of the apartment.
In a brief interlude, Crow, in the form of a literal crow, circles the forest. He spots a man dressed in a red track suit and black silk hat. The man tells Crow that he makes flutes out of the souls of cats, and he’s traveling to where he can make the biggest flute of all. He says that the forest where they are now is like limbo: the man has died and is now a soul in transition. It’s impossible for Crow to hurt him, he says, but invites Crow to try. Crow pecks out the man’s eyes, but the man just laughs. Crow rips out his tongue, and he continues to laugh, now soundlessly. The wheezing sounds almost like a flute.
In the cabin in the ravine, the young version of Miss Saeki appears to cook Kafka’s meals. He is overjoyed to see her, but soon realizes that she has no memories of the past—and that, if he doesn’t leave soon, he too will lose his memories. In the afternoon, the middle-aged Miss Saeki arrives and tells Kafka that he must leave the valley. He asks, again, if she’s his mother. Miss Saeki responds only that she once abandoned someone she shouldn’t have, and asks if Kafka can forgive her. He forgives her, and, in his head, forgives his mother, and feels as if a frozen part of his heart has crumbled. Miss Saeki pricks her arm with a hairpin and lets Kafka drink some of her blood, and then leaves the cabin and stumbles back through the woods to Oshima’s cabin. Oshima’s brother drives Kafka back to the library, where he tells Oshima he has decided to return to school in Tokyo. They part, promising to meet again someday. On the phone, Kafka also says goodbye to Sakura, fondly calling her his sister. Thinking about all that has happened to him, Kafka gets on the train to return home.