Things quickly get out of hand.
Prisoner 8612 rebels and is the most outspoken, but some of the guards start to use physical force against him. While locked in the hole with another prison, they ally and plan an escape, but they are soon caught.
Two other cells rebel, but the third cell doesn't follow and get perks from the guards. When the other prisoners fall in, Prisoner 8612 realises he's on his own, and under constant pressure from the guards he soon cracks and has a mental breakdown. He is pulled out of the experiment when he mentions that he wants a lawyer.
A little later, the other prisoner who was his ally, also succumbs to the mental torture and wants out. Dr. Zimbardo can see the pain he is in and empathizes with the boy, sending him home.
Led by Guard 'John Wayne', the Prisoners are humiliated. They can appeal for a Parole - and when some would be granted parole, without pay for their time, it is clear they have taken on their roles when they could leave with the same effect. Jesse, who has experience of jail and sits on the board, is at the parole hearing of a prisoner, and relishes the power it gives him. He realizes that he too has a problem and leaves the project, instructing Zimbardo to send the boy home.
A new prisoner is recruited to fill the gaps, but when he refuses to eat sausages he is placed in the hole, and the other prisoners are forced to turn on him.
Zimbardo's girlfriend has watched some of the sessions, and is the only one who seems to see the problems and psychological harm it is causing the participants - she tells Zimbardo to end it. Zimbardo doesn't want to hear, because he is too involved in the experiment himself.
John Wayne further humiliates the prisoners, even turning on the one prisoner who has always been obedient. When he makes them perform mock sexual advances on each other, he is forced to step in and call a halt to it.
Later, Prisoner 8612 and 'John Wayne' sit down to talk about their experiences - it was only a coin flip that decided which of them would be a prisoner or a guard. 8612 says he isn't sure what type of guard he'd have been, but wouldn't have been as inventive or enjoyed it as much as John Wayne did. Wayne says he was only playing a character (from Cool Hand Luke), and was surprised nobody stood up to him or told him he'd gone too far.
We're told in the credits that Zimbardo married his girlfriend, and of the participants none had any lasting psychological problems.