In Shakespeare's Macbeth, the social and moral order is restored when Macbeth is killed and Malcolm gains the throne.
Macbeth's murder of King Duncan upset the natural order of the social and political hierarchy in Scotland. He did the unthinkable, betray a divinely approved-of king. This throws Scotland into unnatural chaos, to the extent that even the natural world reacts--horses become cannibals, etc.
Macduff sets Scotland right by killing Macbeth. Malcolm is present with an army of supporters, and will take his natural place--as the designated heir of Duncan--as the king of Scotland. The evil is purged and the rightful king will take his place on the throne.
From the time Macbeth kills the rightful king and usurps the throne, nature is thrown out of order. There are numerous reports of unnatural actions in nature itself after the murder. Since Duncan was the "Lord's annointed" and Duncan has been murdered things will not be normal until the murderer is brought to justice.
Since Duncan had named his successor before he was murdered, order will be restored when Malcolm is crowned king.
Curiously, the supernatural plays a great role in all this. First the weird sisters declare Macbeth will be king. Lady Macbeth calls up the dark powers to unsex her and fill her with evil. Both of the Macbeths go to the dark side.
Since Macbeth tries to interfer with the predictions by killing Banqueo, Hacate herself gets involved. The predictions that he believes keep him safe are a double edged sword. The forest does indeed move and MacDuff was not "born" of woman but was from his mother's womb untimely ripped.
It is only fitting that it is MacDuff rather than Malcolm who kills Macbeth since Macbeth killed his entire family. Order is restored and nature has been balanced.
An orderly succession and order were extremely important to the Elizabethean world. The War of the Roses was a recent memory and the entire country had been ripped apart on the question of succession.
The restoration of the moral and the natural order in Macbeth happens through the killing of Macbeth. The various images of social defilement are presented in Macduff's report on Scottish state to Malcolm in England. The images of hell-kite, milk of heaven in hell, hanging of people who talk of fear and the images of falsehood and betrayal like the Martlet bird building its nest in the castle of Macbeth, mistaking it for a temple---there are many traces to suggest both moral and natural disorder.
The first sign of restoration is the presentation of the English king and his purificatory function. The soldiers in the guise of Birnam wood, moving towards Macbeth can be seen as an attack conducted by nature herself. Otherwise, since the play ends immediately after Macbeth's beheading, the restoration cannot be shown in a more comprehensive way. Macbeth's tomorrow and tomorrow speech can be seen as a sign of moral purgation in him.
Whether there is an absolute restoration of the moral and the natural orders is a question. The end of Polanski's film version goes back to the beginning with the mysterious figure of either Malcolm or Donalbin entering the cave of the witches. The cycle of evil may begin afresh from there.