Macbeth can also be interpreted to contain a message of hope. Although the principal characters die, good triumphs over evil. Macbeth, who becomes evil once he murders King Duncan, is defeated at the end of the play. Duncan was a good and rightful King, he was loved by the people, when he is murdered, nature itself is disturbed, things are turned upside down with the weather also.
In order to restore the balance of nature, Malcolm, the King's rightful heir must ascend the throne in Scotland. So the battle for the throne in Scotland is literally a battle between good and evil, the results are that evil is defeated and good is restored in the form of Malcolm, the good and rightful King of Scotland.
This story can be viewed as containing an inspirational message about the laws of nature, Providence, the Divine. The Powers that be worked in conjunction with good and honest people like Macduff and Malcolm, and the English King, to return to Scotland and overthrow the unlawful King Macbeth and reclaim the throne for Malcolm.
The story also has a moral in it, don't surrender your soul for material wealth and power, its not worth it.
Even though this play is labeled as a tragedy, the final message is one of hope. The play is entitled the "Tragedy of Macbeth" and, indeed, Macbeth is a tragic figure. He is seduced by both greed and power. However, that fact that good eventually overcomes evil is a hopeful message. At least, Shakespeare, the author, would see it that way. Macbeth was a usurper and a murderer of the rightful king. Eventually, he is killed and the rightful king, Malcolm, restored to the throne. This would ultimately lead to the descendants of Banquo, who included James I of England, to take the throne of Scotland and then unite both Scotland and England together as one country. Since James I was king when Shakespeare wrote the play, this was most likely Shakespeare's intent and he I think he accomplished it. Most people are not sad a Macbeth's demise at the end of the play, but see it as one of hope for the future.
Overall, the play is a tragedy, so it ends with the eternal suffering of the hero (Macbeth is a damned soul) who is removed from the world--he's dead--and with the restored order to the world--Malcolm, the rightful king, is in place. What's more, Malcolm is the world brought into balance, for he is not so fair that he cannot see foul, nor so foul that he cannot be fair--check his testing of Macduff's loyalty. But as for the message--I'm not so sure that hope is the issue. The ending is more about cleaning up the mess and calling people home--I think the message is more about safety--but a particular significant kind of safety--the saferty that comes with clear moral vision. The ending shows that a person cannot split his identity to suit a circumstance. Just as Macbeth is a killer, an executioner, in war, so is he in life; just as Lady Macbeth cannot "unsex" herself to care more for power than for family. Thus, the Macbeth that impales a severed head becomes himself severed head--foul is foul--so the message is for now at least, things foul and fair are as they seem.