Paul Crewe (Adam Sandler) is a former NFL player disgraced for shaving points in a big game. One night, he gets drunk and goes joyriding in his girlfriend's Bentley, totals it, gets arrested, and is sentenced to three years in a Texas Federal Prison for violating his parole.
In prison, Warden Rudolph Hazen (James Cromwell) uses threats and confinement in a hot box to coerce Crewe into helping the prison guards' football team, led by the hostile Captain Knauer (William Fichtner). Crewe informs Hazen that what Hazen's team needs is a tune-up game to boost the guards' confidence, and is therefore coerced to form a team to play against the guards out of fellow inmates. With the help of newfound friend, Caretaker (Chris Rock), they start off with a poorly organized team, before being noticed by another prisoner, former college football star, Nate Scarborough (Burt Reynolds), who decides to help coach the team and help gather several intimidating inmates as a boost to the team's strength.
Caretaker tells Crewe that they need more "brothers" on the team. When Crewe goes to the basketball court to ask the black inmates to join the team, their leader, Deacon Moss (Michael Irvin) rebuffs him. Crewe challenges Deacon to a one-on-one basketball game, saying that if he wins, the brothers will join the team, and if Deacon wins, Crewe will leave them alone. Deacon accepts, and despite Deacon's undisguised personal fouls in which he elbows, punches or grabs Crewe, Crewe continues without complaint, because the match is a question of pride and respect. On the game-winning shot, Crewe cleanly steals the ball from Deacon and scores, but Deacon calls a foul. Realizing he wouldn't be allowed to win, Crewe let's Deacon score the final shot. Although Deacon beats Crewe, one of the brothers, a fast runner named Earl Megget (Nelly), impressed with Crewe's decision to take the beating, joins the football team as its running back. When the guards learn of this, they confront Earl in an attempt to provoke an assault by him by saying the racial epithet "nigger", but Earl does not allow himself to be provoked despite intimidation and minor abuse. Having witnessed this, the other "brothers", including Deacon, decide to join the team too.
Hazen and the guards continue attempts to hinder Crewe's team by flooding their field, but the team decides to practice in the mud anyway.
Inmate Unger (David Patrick Kelly) spies on the activities of the inmates and after being pressured by the guards, rigs Crewe’s radio with an explosive. Caretaker unknowingly enters the cell to give a photo gift to Crewe, but is killed when he tries to turn the dial on the radio.
On game day, the inmates are revitalized in the wake of Caretaker's murder when Crewe reveals Caretaker's last gift to the team, quality gear and uniforms from his cousin at Reebok with the team name "Mean Machine" on the uniforms. The Mean Machine overcomes a rough start, due to individual inmates' attempts to retaliate against guards for the abuse they've suffered. Crewe angrily tells the inmates that winning the game is more important and will damage the guards more than their personal grudges, and gets them to play as a team. The first half ends with the score tied. The angered Hazen informs Crewe in private that if he does not lose he will be charged for Caretaker's murder. Crewe acquiesces to Hazen's threat, asking that the guards refrain from using excessive force on the field after getting a comfortable lead, to which Hazen agrees to do so after they obtain a two touchdown lead. After Crewe fakes an injury in order to leave the field, his teammates voice their displeasure over his obvious deserting over the team.
After seeing that Hazen has broken his promise and two members of the Mean Machine are injured, Crewe asks Skitchy if the time spent in jail for punching the warden was worth it. Skitchy replies, "It was worth every goddamn second," and inspired Crewe returns to the field. The team initially doubts Crewe’s resolve and allows him to be sacked twice. After running for a first down on 4th and Long, Crewe, realizing that his inmates are still not protecting him due to his prior actions, calls a huddle, and admits to the point shaving that disgraced him, (although he did not do it for money, he did it because he had received death threats) and to the injury that he faked as a result of Hazen's threat, and sabotage to the other inmates, and asks for their forgiveness, putting his hands in the middle of all of them. Moss puts his hand in, followed by the rest of the team.
The Mean Machine, united again as a team, quickly scores two touchdowns to cut the guards' lead to 35-28. After Megget is injured after a long run, Scarborough comes in for one play as replacement and scores a touchdown off a trick play involving a fumble called a Fumblerooski. Mean Machine decides to go for the two-point conversion and the win. As they get up to the line they seem to be confused, and Crewe and Scarborough start arguing in order to trick the guards. Moss gets the snap and passes it to Crewe, who scores the winning conversion, winning the game. Knauer, with a newfound respect for Crewe, tells him that he showed extraordinary nerve, and lets him know that he will vouch that Crewe had nothing to do with Caretaker's death.
Hazen admonishes Knauer for losing a fixed game and notices that Crewe is heading towards the exit. Eagerly implying Crewe is trying to escape, Hazen orders that Crewe be shot for attempting to escape. Knauer hesitates and at the last moment realizes (and scornfully tells Hazen) that Crewe is only picking up the game football. Crewe returns it to Hazen, telling him to "stick it in [his] trophy case." Moss and Joey Battle (Bill Goldberg) give Hazen a Gatorade shower, and when he tells them that this has earned them a week in the hot box, Battle defiantly yells "Who gives a shit?!"