Both Macbeth and John Proctor are tragic heroes; however, Macbeth begins the play as a good man, ending it badly, and Proctor begins The Crucible as a troubled sinner, ending it as a redeemed man with a renewed sense of his own integrity. In other words, then, in some ways they seem to have opposite trajectories.
Initially, Macbeth is described as "brave" and is granted a new title by the king as a reward for his loyalty and courage. His wife says that he is "full o' th' milk of human kindness" and believes that he is too good a man to even consider doing something unethical. However, as the play progresses, Macbeth becomes worse and worse: first killing his king and kinsman, Duncan (though at least he felt guilty about that one), then arranging for the murder of his best friend, Banquo, and the attempted murder of Banquo's son (for which he only regretted the endeavor's half-success), and then the murder of an innocent woman and her children (done because he regretted not having killed Macduff when he had the chance). His morality is in tatters by the play's end, and he realizes that he's done all for naught when he claims that life is a "tale / Told by an idiot, full of sound and fury, / Signifying nothing" (5.5.29-31).
John Proctor, on the other hand, begins the play feeling like a "fraud" because of his extramarital affair with Abigail Williams some seven months prior. In fact, almost until the very end, he feels that he is "no good man" and that his "honesty is broke [...]." He does not believe that he has anything good inside him until he realizes that he is unwilling to sign his name to a dishonest confession and allow it to be published to the village. When he tears the paper, he says, "You have made your magic now, for now I do think I see some shred of goodness in John Proctor." He ends the play with a sense of his own goodness, having been redeemed by his inability to confess a lie. He dies a man of integrity, unlike Macbeth, who has completely lost all goodness that was once within him.
In the end, both characters are capable of goodness; they simply make different choices -- one to cultivate goodness and the other to destroy it.