John Proctor refuses to save his life by confessing and naming names. Hale tries to get those imprisoned to save their lives because the court is allowing them to live if they confess.
At first, Proctor agrees, and this is done to please Elizabeth. But, his soul is already tortured because of the affair with Abigail, and he wants his good name and dignity back. He decides it is better to die than to lie any further. He has been scornful of the proceedings all along, and does not want to be hypocritical anymore.
In choosing to hang, he regains his dignity and self-respect. For Proctor, this was a better choice.
John Proctor suffers internal conflict throughout the play. Attracted physically to Abigail, he violates his vows to his wife and consequently suffers pangs of conscience. He knows that he has dishonored himself and hurt his wife. When he is accused of witchcraft and brought before the court, he is given the chance to the confess to being a witch and name others who also might be witches, thereby avoiding execution. All he has to do is sign a confession and allow it to be posted on the church door. Initially, he is tempted to do so, for that will allow him to be able to see hear about his family and remain a presence in their lives. Elizabeth urges him to consider this option. However, if Proctor knows that if he confesses to a something that is untrue, he loses even more of his self-respect and personal honor. By the end of the play, he has little left: he has hurt his wife and Abigail and has jeopardized the well being of his family. In refusing to confess solely to save his own life, John Proctor restores his honor and self-respect and leaves that legacy for his family. He redeems himself at his execution--his life is no longer a lie.