In Sophocles's Oedipus Rex, Oedipus has great pride in himself and in his accomplishments. Oedipus is the loved and respected King of Thebes, who has ruled Thebes since he was made king after he saved the Theban people from the tyranny of the Sphinx.
It is this same pride, however, taken to extremes—known to the ancient Greeks as hubris—that causes Oedipus to make decisions that he believes he makes with the best intentions but which ultimately contribute to his tragic downfall.
At the beginning of the play, the people of Thebes appeal to Oedipus to relieve them of a plague and a famine that afflict the city. Oedipus learns from the Oracle that the gods have brought the plague and famine down on Thebes because the murderer of their former king, Laius, still lives among them. Oedipus resolves to discover the identity of the murderer, and either execute him or exile him from the city, in order to appease the gods and restore prosperity to Thebes.
Once he vows to find the murderer, Oedipus puts his pride at stake, and from that point on, he's determined to fulfill his vow, no matter where his investigation leads.
OEDIPUS. I will start afresh and once again
Make dark things clear. ... I also, as is meet, will lend my aid
To avenge this wrong to Thebes and to the gods...
And now that I am lord,
Successor to his throne, his bed, his wife ... therefore I
His blood-avenger will maintain his cause
As though he were my sire, and leave no stone
Unturned to track the assassin.
As the events of the play unfold, it becomes increasingly clear that Oedipus is Laius's murderer, but Oedipus steadfastly refuses to believe it. Nevertheless, the same sense of excessive pride that won't allow Oedipus to accept the fact that he's the murderer of Laius is the same sense of pride that drives the investigation relentlessly forward. Oedipus simply cannot abandon the investigation until it's been proven beyond any doubt who the murderer is, even if it's Oedipus himself.
In time, Oedipus is revealed as Laius's murderer, and Oedipus is forced to accept the fact that not only did he murder Laius, but Laius was his own father, and Laius's queen, Jocasta, was his own mother to whom Oedipus was married to when he was made King of Thebes, a reward for freeing the people of Thebes from the Sphinx.
The hubris that Oedipus exhibits during the course of Oedipus Rex is often cited as his "tragic flaw," and his prideful determination to complete his investigation into the murder of Laius at all costs is generally considered his hamartia—his tragic mistake or error in judgment.
This might be true in terms of the play itself, but in terms of Oedipus's life, it was his parents' and his own prideful attempts to avoid his fate and defy the will of the gods—the prophecy made by the Oracle that Oedipus would kill his father and marry his mother—that ultimately leads to Oedipus's tragic downfall. The course of Oedipus's life and his tragic fate were determined long before the play begins.
The events of Oedipus Rex are simply the culmination of a lifelong tragic downfall that began only a few days after his birth in Thebes, to which city he returned in triumph and reigned as king and from which city he'll be self-exiled in utter disgrace.