In Kafka on the Shore, Kafka Tamura leaves home to escape the prophecy his father announced: that Kafka is fated to kill his father and sleep with his mother and sister. Kafka's curse is an allusion to a tragic hero figure from Greek mythology named Oedipus, who unwittingly kills his father and marries his mother.
The myth of Oedipus has multiple versions, but the most widely understood iteration begins with Oedipus's father King Laius of Thebes. After an oracle studies bird entrails and tells Laius that he will be murdered by his own son, Laius seeks to thwart the prophecy by asking a shepherd to leave the baby Oedipus for dead on a mountainside. The shepherd cannot bring himself to kill the child, and so Oedipus is raised by King Polybus and Queen Merope of Corinth.
Although Oedipus grows up to learn from an oracle of the prophecy, he believes that his parents are Polybus and Merope. To avoid the prophecy, he leaves for Thebes, along the way killing a man who turns out to be Laius. Oedipus answers the riddle of the Sphinx, a monster that had been keeping Thebes captive. Having done so, Oedipus becomes King of Thebes and marries Jocasta, with whom he has four children.
Thebes is eventually beset by a plague, and Oedipus needs to discover who killed Laius in order to stop it. In the process, he learns that he killed Laius. After realizing that she married her own son, Jocasta hangs herself. Oedipus blinds himself with a broach from Jocasta's dress.
The most famous and lasting literary rendition of the Oedipus myth is Sophocles's play Oedipus Rex. The play begins with Oedipus already serving as King of Thebes: through discovering why the plague has come over the city, he uncovers the truth of his own history.