Creon is in a notably difficult position in the play Antigone. The city of Thebes has undergone numerous misfortunes, including the death of Laius, a plague, the discovery that the city's savior Oedipus actually murdered his father and married his mother, and finally the fratricidal wars between the brothers Polyneices and Eteocles. In light of these events, Creon is trying to restore some semblance of order and normalcy to the city. Because of this, he makes the harsh decision that while Eteocles shall be buried with honor, Polyneices' corpse shall be left out for the birds and beasts that feed on carrion. He decrees that anyone attempting to bury the corpse of the traitor shall be stoned to death.
When Antigone is identified as the culprit trying to bury the body, Creon is confronted with a dilemma. Not only is Creon Antigone's uncle but Antigone is engaged to Creon's son Haemon. In Greek religion, killing or harming a relative calls down the vengeance of the gods not just upon the perpetrator but also upon the community as a whole. Thus rather than actively kill Antigone, Creon orders her walled up in a cave. If she starves to death, that will not bring ritual pollution and the gods' anger on Thebes and Creon; in a sense, Creon is trying to escape the displeasure of the gods on a technicality.
Of course, one can never escape divine justice in Greek plays, and when Antigone commits suicide, tragedy ensues with Haemon, Creon's son, and Creon's wife, both also committing suicide.