Macbeth is interested in exploring the qualities that distinguish a good ruler from a tyrant (what Macbeth clearly becomes by the play's end). It also dramatizes the unnaturalness of regicide (killing a king) but walks a fine line by portraying the killing of King Macbeth. Although the play is set in 11th century Scotland (a time when kings were frequently murdered), Macbeth has a great deal of contemporary relevance. In 1603, King James VI of Scotland was crowned King James I of England, becoming England's first Stuart monarch. The play alludes to an unsuccessful Catholic plot (the Gunpowder Plot of 1605) to blow up Parliament and King James. Shakespeare also pays homage to the Stuart political myth by portraying Banquo as King James's noble ancestor.
In Macbeth, regicide (killing a king) is unnatural and evil but tyrannicide (killing a tyrant) is a perfectly acceptable action.
Although King Duncan is a good man and a virtuous king, he's also too "meek" to rule effectively. Macbeth, on the other hand, rules Scotland like a tyrant. The play, then, suggests that a truly good monarch should be a temperate ruler and strike a balance somewhere between Macbeth and Duncan.