In Act II of The Crucible, we see Proctor at war with himself when challenged by his wife Elizabeth to tell the court what Abigail told him earlier: namely, that the witchcraft allegations are unfounded. Proctor hesitates to tell the court the truth, because this would hurt Abigail, expose her as a liar, and at this stage he still has feelings for her, as Elizabeth realises:
She has an arrow in you yet, John Proctor, and you know it well! (Act II)
Proctor therefore struggles to do what he knows to be the right thing. He does go to the court eventually, but only after his own wife Elizabeth is arrested, and he still hesitates to confront the court too openly. It all ends in disaster for him as his own affair with Abigail is revealed, destroying his credibility in the eyes of the Puritan court officials, and he too is accused of witchcraft.
Therefore, Proctor's personal entanglement with Abigail proves to be his undoing and destroys his good name. Ultimately, the only way out for him is death, which he chooses rather than falsely confessing to witchcraft. This, at least goes some way to redeeming him in his own eyes, atoning for his sin of adultery and his earlier hesitation to condemn the fear and falsehood of the court:
Now I do think I see some shred of goodness in John Proctor. Not enough to weave a banner with, but white enough to keep it from such dogs. (Act IV)