Creon is both a villain and a tragic hero in Antigone. Creon is a villain in that he becomes a tyrant overstepping the bounds of Greek moral law in not allowing the burial of Polynices. Creon has many rational and hard headed reasons for not permitting Polynices the proper burial rites: Polynices led a civil war against Creon and Thebes and is regarded as a traitor by most of the Theban people. Creon wants to set a very strong example of what happens to those, even very high born, who rebel against the legitimate authority of the state. Leaving Polynices to rot and be eaten by birds would send a strong to anyone contemplating a rebellion.
However, Creon becomes a villain in going too far. Not allowing a person the proper burial rites in Ancient Greece was a sin against the gods, as pointed out by Antigone, Haemon, Tiresias, and the chorus. Creon might have been justified in letting Polynice's lie exposed for a short time as an example, but his stubborn refusal to bury him at all violated moral norms. Further, Creon was a villain in condemning Antigone to death for performing burial rites over Polynices. She felt she had no choice but to follow her conscience: she didn't want to defy Creon or defy Theban law, but she felt she had to to obey the higher spiritual law of the gods. Creon showed no compassion for her predicament.
Creon is villainous in his treatment of Polynices and Antigone but he is also a tragic hero, a high born figure with the fatal flaw. His flaw, like Oedipus, is that of hubris or pride. It is his undoing. Creon is too inflexible for too long, and as a result, Antigone has committed suicide before he reverses her sentence. This leads Haemon to kill himself and then Euridyce. Without his son and wife, Creon's life tragically loses all its meaning. He pays a very high and tragic price for refusing to follow the moral law of his society.