In Shakespeare's Macbeth, how does the play explore the idea of justice and what theme might this connect to?
Justice is about restoring order. And in a play such as Macbeth, there is a tyrant who has usurped the throne; he is not the rightful king, is not of the royal bloodline. Macbeth has stolen something sacred, since the divine right of kings, during the time of the Renaissance, is moral law. It's arguable, that Macbeth has committed one of the most heinous and sinful crimes that can be considered during Shakespeare's time. Macbeth's overambitious nature, along with his wife's, leads him down this path, and this theme of ambition driving man to his downfall and destruction leads to the necessity for justice to correct this dangerous and ambition and restore order.
The above answer explores the King seeking justice for the Thane of Cawdor's treachery and betrayal in siding with the Norweyans. The traitorous Thane, who is ambitious himself, being promised his own spoils, is sentenced to be beheaded and put on public display, which is still a sense of reminding others of the order of things, of who is in charge, to put it plainly. But let's also look at two other notions of justice that are connected to this idea of ambition.
Macbeth has murdered Macduff's family in an attempt to smote his enemies and retain the throne. He has sent assassins to kill Macduff himself, only to find that Macduff is not home, but has fled to join Malcolm in England who is readying an army to revolt against the tyrant King. With Macduff gone, the murderers to the Macduff's wife and childred and eliminate them. I'm arguing that this still stems from Macbeth's ambitious nature to control everything and eliminate any threats. The ambition even blinds Macbeth to murder innocent characters. But now it is up to Macduff to restore order, as he and Malcolm discuss what's to be done next after hearing of this murderous news. Malcolm states, "Be comforted. / Let's make us med'cines of our great revenge, / To cure this deadly grief," and later tells Macduff to "Dispute it like a man" (IV.3.213-215, 219). Malcolm understands that justice is up to these two men: one to avenge the death of his father and the other to avenge the murder of his family, both at the hands of the ambitious tyrant.
Finally, it is Macduff who must physically right the wrongs done to all of Scotland. In Act 5, it is Macduff who will clash swords with Macbeth on stage, referring to the tyrant as a "hell hound". Eventually, Macbeth's head is taken and placed upon the battlements as a testament to the entire country that order is restored, that justice has been served. The rightful King, Malcolm, is placed on the throne, all of the enemies of the state are rounded up and executed for their own ambitions (just as the Thane of Cawdor had been executed 4 acts earlier). Macduff has done the deed and now must recognize the Malcolm: "Hail! King! for so thou art: behold, where stands / Th' usurper's cursed head. The time is free" (V.8.54-55). Macduff explains that the country has been liberated, that deadly ambition has been beaten back and all is right again.
But this notion of justice and relation to ambition is a curious one. Justice is necessary only when something unfortunate, wrong, disorderly has been committed. Without misfortune and evil, there would be no need for Justice.
The question of Justice is a little ambiguous but I assume you are referring to the death of Macbeth and the execution of the previous Thane ofCawdor.
The execution of Cawdor is mainly a dramatic device to foreshadow Macbeth's own forthcoming downfall. However, I think that the principal theme at play in the exercise of justice is that of Loyalty. Malcolm speaks of the dead Thane honourably and describes his apology and repentance;
"...he confess'd his treasons,
Implor'd your Highness' pardon, and set forth
A deep repentance..."
Regardless of these accolades, Duncan refuses to pardon his crimes and asserts that the betrayal of his trust is unforgivable;
"He was a gentleman on whom I built
An absolute trust-"
I think that Shakespeare is highlighting the view that loyalty is a superiour virtue to honour. This could be to make Macbeth's own treason seem even more evil and to inspire excitement in the audience due to the riskiness of the murder. However, I think it is also asking whether Justice is correct. The execution of the previous Thane of Cawdor gave way to a homocidal one, Macbeth. Similarly, Macbeth carries out 'justice'in the eyes of the other characters when he murders Duncan's chamber servants. I think Shakespeare is trying to convey here that Justice is subjective to the context it is carried out in. Obviously the servants were innocent scapegoats but because everyone assumed they had murdered the king, Macbeth was seen as just in killing them.
Simillarly, later on in the play, Malcolm leads an offensive on Macbeth's castle which results in his death. Macduff (who kills Macbeth) commits the same crime as Macbeth-regicide- but it is viewed as justice due to Macbeth's own crimes.
Interestingly, possibly the most evil characters in the play, the Witches, are never brought to Justice. Since the witches are symbols of utter chaos-commiting crimes without motive-it could be said that Shakespeare is trying to transmit to the reader that Justice is nothing more than a way to bring order to chaos.
To summise, the theme explored in the bringing of Justice on the previous Thane of Cawdor is, in my opinion, the importance of Loyalty and the theme explored in the bringing of justice on Macbeth and the servants and the lack of justice brought upon the Witches, is the subjectivity and the importance of Justice itself.