That he marries his mother and has children by her are the immoral acts of Oedipus in "Oedipus Rex" by Sophocles (495 B.C.E. -- 405 B.C.E.).
Specifically, immorality refers to living life in such a way as to offend society. It runs counter to what is considered acceptable and decent in polite company. Oedipus therefore is immoral in becoming involved with his own mother and having children with her and criminal in killing his father.