In the last act of the play, John Proctor is facing death by hanging for the crime of witchcraft. When he initially confesses, it is to save his life so that he will be there for his children. Elizabeth, you'll remember, is also sentenced to die after she gives birth to the baby she is carrying.
Proctor's confession would let him live and his children would have at least one parent left to them.
An addition reason for Proctor's willingness to confess comes from the fact that he has been judged only on lies. Abigail and Mary Warren have hung the mantel of witchcraft on Proctor without any facts or evidence to back up their claims. Proctor is simply not guilty.
He has already confronted the court and exposed the lies at the root of the Salem witch trials, yet the court persists in carrying out its death sentences. Danforth's reasons for continuing are far from morally convincing. In Proctor's eyes, the court has no moral standing whatsoever. Lying to them to save his life is, for this reason, not really a lie. He is merely feeding the court according to its nature.
Proctor stops short of naming names of others because he does not want to condemn anyone. He only wants to save himself. He feels that he is weak enough to allow himself to confess to something he did not do, but he is not so weak as to bring others down with him. He has too much regard for the worth and value of others to condemn them.
He cannot bear the knowledge that his signature will be used to condemn other innocent citizens.
Finally, Proctor finds that he has too much regard for his own worth and his own integrity to sign a written confession. Lying on record is more of an actual lie than making a false statement to a group of people who cannot hear the truth anyway. Lying on record is a step too far for Proctor. His pride and integrity will not allow it.
The anguish that stops him short is expressed in his climactic lines:
Because I lie and sign myself to lies! Because I am not worth the dust on the feet of them that hang! How may I live without my name? I have given you my soul, leave me my name!"