In Greek mythology, the character Oedipus is cursed by the gods with a prophecy that he will kill his father and marry his mother.
Oedipus was left on the side of the road as a baby because he was born with a deformity on his feet that made him an embarrassment to his parents. His biological parents were Laius and Jocasta, who adopted him when they discovered him abandoned on their doorstep. When he grew up and learned about the prophecy from an oracle, he left home in an attempt to avoid fulfilling it. But in doing so, he actually fulfilled it inadvertently because he killed King Laius and married Queen Jocasta without realizing that they were actually his biological parents!
Eventually he learned that Laius was actually his biological father and Jocasta was actually his biological mother (after killing them both), but by then it was too late for him to change anything about what had happened in his life so far. The prophecy ultimately led to Oedipus’ downfall by ruining any chance at happiness he might have had.