When the play opens, Thebes is suffering a plague which leaves its fields and women barren. Oedipus, the king of Thebes, has sent his brother-in-law, Creon, to the house of Apollo to ask the oracle how to end the plague. Creon returns, bearing good news: once the killer of the previous king, Laius, is found, Thebes will be cured of the plague (Laius was Jocasta's husband before she married Oedipus). Hearing this, Oedipus swears he will find the murderer and banish him. The Chorus (representing the people of Thebes) suggests that Oedipus consult Teiresias, the blind prophet. Oedipus tells them that he has already sent for Teiresias.
When Teiresias arrives, he seems reluctant to answer Oedipus's questions, warning him that he does not want to know the answers. Oedipus threatens him with death, and finally Teiresias tells him that Oedipus himself is the killer, and that his marriage is a sinful union. Oedipus takes this as an insult and jumps to the conclusion that Creon paid Teiresias to say these things. Furious, Oedipus dismisses him, and Teiresias goes, repeating as he does, that Laius's killer is right here before him - a man who is his father's killer and his mother's husband, a man who came seeing but will leave in blindness.
Creon enters, asking the people around him if it is true that Oedipus slanderously accused him. The Chorus tries to mediate, but Oedipus appears and charges Creon with treason. Jocasta and the Chorus beg Oedipus to be open-minded: Oedipus unwillingly relents and allows Creon to go. Jocasta asks Oedipus why he is so upset and he tells her what Teiresias prophesied. Jocasta comforts him by telling him that there is no truth in oracles or prophets, and she has proof. Long ago an oracle told Laius that his own son would kill him, and as a result he and Jocasta gave their infant son to a shepherd to leave out on a hillside to die with a pin through its ankles. Yet Laius was killed by robbers, not by his own son, proof that the oracle was wrong. But something about her story troubles Oedipus; she said that Laius was killed at a place where three roads meet, and this reminds Oedipus of an incident from his past, when he killed a stranger at a place where three roads met. He asks her to describe Laius, and her description matches his memory. Yet Jocasta tells him that the only eyewitness to Laius's death, a herdsman, swore that five robbers killed him. Oedipus summons this witness.
While they wait for the man to arrive, Jocasta asks Oedipus why he seems so troubled. Oedipus tells her the story of his past. Once when he was young, a man he met told him that he was not his father's son. He asked his parents about it, and they denied it. Still it troubled him, and he eventually went to an oracle to determine his true lineage. The oracle then told him that he would kill his father and marry his mother. This prophecy so frightened Oedipus that he left his hometown and never returned. On his journey, he encountered a haughty man at a crossroads - and killed the man after suffering an insult. Oedipus is afraid that the stranger he killed might have been Laius. If this is the case, Oedipus will be forever banished both from Thebes (the punishment he swore for the killer of Laius) and from Corinth, his hometown. If this eyewitness will swear that robbers killed Laius, then Oedipus is exonerated. He prays for the witness to deliver him from guilt and from banishment. Oedipus and Jocasta enter the palace to wait for him.
Jocasta comes back out of the palace, on her way to the holy temples to pray for Oedipus. A messenger arrives from Corinth with the news that Oedipus's father Polybus is dead. Overjoyed, Jocasta sends for Oedipus, glad that she has even more proof in the uselessness of oracles. Oedipus rejoices, but then states that he is still afraid of the rest of the oracle's prophecy: that he will marry his mother. The messenger assures him that he need not fear approaching Corinth - since Merope, his mother, is not really his mother, and moreover, Polybus wasn't his father either. Stunned, Oedipus asks him how he came to know this. The messenger replies that years ago a man gave a baby to him and he delivered this baby to the king and queen of Corinth - a baby that would grow up to be Oedipus the King. The injury to Oedipus's ankles is a testament to the truth of his tale, because the baby's feet had been pierced through the ankles. Oedipus asks the messenger who gave the baby to him, and he replies that it was one of Laius's servants. Oedipus sends his men out to find this servant. The messenger suggests that Jocasta should be able to help identify the servant and help unveil the true story of Oedipus's birth. Suddenly understanding the terrible truth, Jocasta begs Oedipus not to carry through with his investigation. Oedipus replies that he swore to unravel this mystery, and he will follow through on his word. Jocasta exits into the palace.
Oedipus again swears that he will figure out this secret, no matter how vile the answer is. The Chorus senses that something bad is about to happen and join Jocasta's cry in begging the mystery to be left unresolved. Oedipus's men lead in an old shepherd, who is afraid to answer Oedipus's questions. But finally he tells Oedipus the truth. He did in fact give the messenger a baby boy, and that baby boy was Laius's son - the same son that Jocasta and Laius left on a hillside to die because of the oracle's prophecy.
Finally the truth is clear - devastated, Oedipus exits into the palace. A messenger reveals that he grabbed a sword and searched for Jocasta with the intent to kill her. Upon entering her chamber, however, he finds that she has hanged herself. He takes the gold brooches from her dress and gouges his eyes out. He appears onstage again, blood streaming from his now blind eyes. He cries out that he, who has seen and done such vile things, shall never see again. He begs the Chorus to kill him. Creon enters, having heard the entire story, and begs Oedipus to come inside, where he will not be seen. Oedipus begs him to let him leave the city, and Creon tells him that he must consult Apollo first. Oedipus tells him that banishment was the punishment he declared for Laius's killer, and Creon agrees with him. Before he leaves forever, however, Oedipus asks to see his daughters and begs Creon to take care of them. Oedipus is then led away, while Creon and the girls go back in the palace. The Chorus, alone, laments Oedipus' tragic fate and his doomed lineage.