He told the court that he had an affair with Abigail Williams. He held on to his secret because he wanted to keep his good name and didn’t want people to judge him or his family. But he told the court that he had an affair with Abigail Williams and told her to go away because he loved his wife. That made him to be known for adultery.
He sacrificed his life for the sake of others. He agreed to confess to the court that he had an affair with Abigail Williams. Which would mean that Abigail was making everything up and just trying to get John Proctor to like her again. The court wanted him to confess it publically and he got angry. He said he wanted to keep his name and not have them judge him. He would not tell everyone publically so he got hung.
The Final reason is because he stands up for what he believes in. He had beliefs that if his name was no good then there was no reason to live. He believed that he wasn’t a true man and he didn’t want to raise his three children and act normal if he wasn’t good. When he died he taught his kids that he wasn’t a bad excuse of a friend and that he stood up for what he believed in. Family and friends meant everything to John