The moral lesson of Antigone is that the law of the gods is higher than human law. Any human law that violates divine law is a sin. Antigone is right to disobey Creon's immoral law forbidding the burial of Polynices.
When Creon sentences her to death for offering Polynices proper burial rites, Antigone tells him he will be held responsible for unjustly killing her. Haemon, Creon's son and Antigone's fiancé, also pleads with his father to consider that he is going too far and becoming a tyrant in sentencing Antigone to death for following her conscience. Tiresias tells Creon the Furies will descend to avenge her death if Creon insists on his immoral path in executing his niece. Finally, the chorus weighs in to reiterate that the laws of the gods transcend human law and cannot be violated without punishment.
Creon pardons Antigone too late, after she has hanged herself. As a consequence, he loses his son and wife to suicide. With their deaths, all meaning leaves his life, and he can do nothing but hope to die.
The play is a cautionary tale about the boundaries of human power. Kings are extremely powerful, but that does not give them the right to violate divine law. Dire consequences follow from overstepping moral limits.