Shortly after Oedipus’ birth, his father, King Laius of Thebes, learned from an oracle that he, Laius, was doomed to perish by the hand of his own son, and so ordered his wife Jocasta to kill the infant. However, neither she nor her servant could bring themselves to kill him and he was abandoned to elements. There he was found and brought up by a shepherd, before being taken in and raised in the court of the childless King Polybus of Corinth as if he were his own son.
Stung by rumours that he was not the biological son of the king, Oedipus consulted an oracle which foretold that he would marry his own mother and kill his own father. Desperate to avoid this foretold fate, and believing Polybus and Merope to be his true parents, Oedipus left Corinth. On the road to Thebes, he met Laius, his real father, and, unaware of each other's true identities, they quarrelled and Oedipus' pride led him to murder Laius, fulfilling part of the oracle's prophecy. Later, he solved the riddle of the Sphinx and his reward for freeing the kingdom of Thebes from the Sphinx’s curse was the hand of Queen Jocasta (actually his biological mother) and the crown of the city of Thebes. The prophecy was thus fulfilled, although none of the main characters were aware of it at this point.
As the play opens, a priest and the Chorus of Theban elders are calling on King Oedipus to aid them with the plague which has been sent by Apollo to ravage the city. Oedipus has already sent Creon, his brother-in-law, to consult the oracle at Delphi on the matter, and when Creon returns at that very moment, he reports that the plague will only end when the murderer of their former king, Laius, is caught and brought to justice. Oedipus vows to find the murderer and curses him for the plague that he has caused.
Oedipus also summons the blind prophet Tiresias, who claims to know the answers to Oedipus' questions, but refuses to speak, lamenting his ability to see the truth when the truth brings nothing but pain. He advises Oedipus to abandon his search but, when the enraged Oedipus accuses Tiresias of complicity in the murder, Tiresias is provoked into telling the king the truth, that he himself is the murderer. Oedipus dismisses this as nonsense, accusing the prophet of being corrupted by the ambitious Creon in an attempt to undermine him, and Tiresias leaves, putting forth one last riddle: that the murderer of Laius will turn out to be both father and brother to his own children, and the son of his own wife.
Oedipus demands that Creon be executed, convinced that he is conspiring against him, and only the intervention of the Chorus persuades him to let Creon live. Oedipus' wife Jocasta tells him he should take no notice of prophets and oracles anyway because, many years ago, she and Laius received an oracle which never came true. This prophecy said that Laius would be killed by his own son but, as everyone knows, Laius was actually killed by bandits at a crossroads on the way to Delphi. The mention of crossroads causes Oedipus to give pause and he suddenly becomes worried that Tiresias' accusations may actually have been true.
When a messenger from Corinth arrives with news of the death of King Polybus, Oedipus shocks everyone with his apparent happiness at the news, as he sees this as proof that he can never kill his father, although he still fears that he may somehow commit incest with his mother. The messenger, eager to ease Oedipus' mind, tells him not to worry because Queen Merope of Corinth was not in fact his real mother anyway.
The messenger turns out to be the very shepherd who had looked after an abandoned child, which he later took to Corinth and gave up to King Polybus for adoption. He is also the very same shepherd who witnessed the murder of Laius. By now, Jocasta is beginning to realize the truth, and desperately begs Oedipus to stop asking questions. But Oedipus presses the shepherd, threatening him with torture or execution, until it finally emerges that the child he gave away was Laius' own son, and that Jocasta had given the baby to the shepherd to secretly be exposed upon the mountainside, in fear of the prophecy that Jocasta said had never come true: that the child would kill its father.
With all now finally revealed, Oedipus curses himself and his tragic destiny and stumbles off, as the Chorus laments how even a great man can be felled by fate. A servant enters and explains that Jocasta, when she had begun to suspect the truth, had ran to the palace bedroom and hanged herself there. Oedipus enters, deliriously calling for a sword so that he might kill himself and raging through the house until he comes upon Jocasta's body. In final despair, Oedipus takes two long gold pins from her dress, and plunges them into his own eyes.
Now blind, Oedipus begs to be exiled as soon as possible, and asks Creon to look after his two daughters, Antigone and Ismene, lamenting that they should have been born into such a cursed family. Creon counsels that Oedipus should be kept in the palace until oracles can be consulted regarding what is best to be done, and the play ends as the Chorus wails: ‘Count no man happy till he dies, free of pain at last’.