The ancient Greek myth of Oedipus is a familiar one. Oedipus, the king's son, is abandoned as a baby and left to die in the wilderness because of a prophecy that he will kill and replace the king. He is rescued by a shepherd. Later in life, he kills the king (not knowing that he is the king, and his original father) in an argument over right of way, and then goes on to solve the riddle of the tyrannical Sphinx and to marry the queen (who doesn't know Oedipus is her son, nor the murderer of the king). In the fullness of time he finds out what he has done - killed his father the king and married the his mother, the queen. This shocking revelation causes Oedipus to put out his own eyes, and return to the wilderness in repentance and shame.
Here's a clip of Pasolini's treatment of the story:
There's a good article on Senses of Cinema website about Pasolini here.