At the end of ACT III, Proctor himself is arrested, despite his original intent of going to court being to free his wife Elizabeth. He arrives with several depositions at the beginning of the Act, all of which should be enough to release Elizabeth and the wives of Giles Corey and Francis Nurse, the men who accompany Proctor to court; however, it becomes apparent very quickly that the court is not interested in hearing any evidence that disproves the girls' claims - mostly because they've rushed in their punishments and many people have already hanged. Admitting the girls are wrong would be admitting those people were innocent and killed unjustly.
The girls are brought in to be questioned about Mary's deposition stating that there is no witchcraft and begin to accuse her of bewitching them; though Mary attempts to stay strong, Proctor sees it is becoming difficult for her to withstand the girls' claims and finally admits that he had an affair with Abigail and that she is after Elizabeth so that she can have John for herself. The judges send for Elizabeth; John and Abigail are turned to face the other direction so that they cannot make eye contact with Elizabeth. John tells the court that Elizabeth "cannot lie," however, she does lie in order to save her husband's reputation - she says that the adultery accusation is false in an attempt to save John's reputation, but it essentially damns him to prison because he has already admitted his sin.
Immediately following this, Abigial begins her theatrics again, with her sights still set on Mary. Mary eventually falls and then accuses John Proctor of bewitching her. When the judge shows signs of believing her, John shouts out "God is dead!" - his commentary that all that is good and right is being put aside for these outlandish and false tales. At the end of the act, John is arrested and later executed for witchcraft.