When referring to Oedipus as a hero in the play Oedipus Rex, one can be referring to one of two things. First, the hero of a story is recognized to be the central character of a story, especially the protagonist. However, while the protagonist is merely the main character that the story is about, the hero is recognized for some heroic deed. The hero is recognized as a noble figure who does his/her best to rescue or redeem other characters. Second, since Oedipus Rex is a tragedy, it also contains a tragic hero. According to Aristotle's definition, a tragic hero is a noble figure with some character flaw that propels the character to a tragic fall or end. Below are passages that reflect Oedipus as both a hero and a tragic hero.
Oedipus especially exhibits his heroic nature in the beginning the story when he is so determined to help the Thebans out of their troubled state. A horrible plague has fallen upon Thebes and we learn in Oedipus's earlier speeches that he is racking his brain to come up with a solution to save his people. His compassion and his drive to help and protect his people is especially what presents him as a noble, heroic figure, as we see in his lines:
Hence, you do not wake me from sleep, but know that I have been weeping much and wandering many roads of the mind. And that which my inquiry found our only cure I have done, for I have sent Creon ... to Apollo's home in Pytho, so that he learn what I should do or say to save this city. (70-77)
However, it is also his fatal flaw that makes Oedipus a tragic hero rather than just a hero, and that tragic flaw is his excessive pride. In fact, we learn that he has had his excessive pride even as a young man and that it is his pride that leads him to unknowingly kill his own father. We learn that when he was younger he visited the oracle at Delphi and had it prophesied that he would one day kill his own father and sleep with his own mother. In his state of anger he headed on the road again far away from his own city. A man and traveling companions were also on the road heading towards Delphi, and when they saw Oedipus, they ran him off the road. Due to his pride and anger, he struck out at the travelers, killing them all, as we see in his lines:
... the old man himself drove me from the road with force. In my anger I struck the driver, turning me off the road, and the old man ... soon was struck by the scepter from his hand ... I killed them all. (832-841)
It was Oedipus's wounded pride at being run off the road as well as his anger that leads him to kill these people, one being his own father. Hence, we see that his excessive pride leads him to the fulfillment of his ill-fated prophecy.