In Macbeth, Shakespeare's ability to convey such a wide variety of emotions comes from his ability to shape such convincing characters. It is said that Geoffrey Chaucer was a "student of human nature," and I believe this was also the case with Shakespeare.
Some of Shakespeare's plays are based on stories that have been told by other authors, such as Romeo and Juliet. Others are based on English history, such as Richard III. The genius of Shakespeare is not found primarily in the story he tells, but in his brilliant writing which enables the play's characters to touch the audience with humor, tragedy, rage, horror, etc.
In Shakespeare's Hamlet, Hamlet's delivery of his famous "To be or not to be" soliloquy is impressive because the author clearly conveys the human response of a man in great emotional pain who wonders if it might not be easier to die than to live.
In Romeo and Juliet, the young lovers are beset by troubles that really should not concern them, however those troubles make a life of love and peace impossible for them.
In Julius Caesar, Brutus kills Caesar, a man he loves, for the greater good of the state of Rome. He makes serious mistakes for the safety of Rome—which he loved more than himself. He struggles with guilt over what he has done, and ultimately loses his life for what he has done.
The author's gift for brilliant characterization allowed Shakespeare to create the character of Macbeth, who is no different from the characters in his other plays—he is a man with human failings. Macbeth is first presented as an admirable person. He struggles with ambition—freely admits to it—and a need for power, becoming a person nothing like the heroic and dedicated servant to the King that he once was. He basically sells his soul for power.
Macbeth fights like a "lion" for Duncan, and Duncan is proud of him. The King rewards Macbeth and promises more to come in the future. He loves Macbeth, and Macbeth loves him. Macbeth is smart, but his ambition leads him to believe witches who he knows work for the powers of darkness. He is brave, yet he folds to the nagging and evil whisperings of his wife, Lady Macbeth. He arranges for the death of his best friend, Banquo. At first, this man shrank from killing the King because of the horror of it. When Lady Macbeth tells Macbeth to take the bloody daggers back and smear blood on the servants that they intend to blame for Duncan's death, Macbeth cannot do it:
I'll go no more:
I am afraid to think what I have done;
Look on't again I dare not. (II.ii.64-66)
He admits that he is "young" at murder, and "practice" will make it easier." He is right—he turns into a treacherous villain who orders the murder of Macduff's wife and children.
Macbeth, this once-great man, becomes an insane, raging monster who loses his soul by killing a king. (This is what the Elizabethans believed.) His "fall" and ensuing death are guaranteed by the machinations of Hecate, queen of the witches and her "minions." The story of Macbeth, in terms of ambition and losing one's sense of self to a thirst for power (or fame or fortune), displays timeless themes, and Macbeth's internal and external struggles still speak to today's audiences. However, the ability of Macbeth's character to convey such a wide variety of emotions comes from Shakespeare's literary genius, and the interaction Macbeth has with the diverse range of characters with which Shakespeare surrounds this tragic hero.