At the opening of the play Oedipus Rex, we discover the Oedipus is the ruler of Thebes, married to Jocasta, and advised by Creon. We know that Oedipus has attained this position by solving the riddle of the Sphinx. He appears to be a dedicated ruler, concerned about the well-being of the citizens. Thebes, however, is afflicted by a terrible plague. The previous ruler, King Laius was murdered and the oracle of Apollo attributes the plague to the gods' punishment for the city's failure to avenge the murder of Laius. Oedipus swears to track down the murderer to appease the gods and free the city from the plague.
The renowned blind prophet Teiresias reluctantly warns Oedipus that he himself is the murderer saying:
...Then I would ask you to stand by
the very words which you yourself proclaimed
... For the accursed polluter of this land is you.
Oedipus continues to seek confirmation of the identity of the murderer and as a consequence discovers that he indeed murdered his father and married his mother. Thus the cause of Oedipus' learning these horrible things is his own desire to save the city from the plague.