Paul Crewe (Adam Sandler) is a former NFL player who, one night, gets drunk and goes joyriding in the Bentley of his girlfriend (Courteney Cox in an uncredited role), crashing it. It is revealed that he was arrested for shaving points in a big game, although it was never proven.
In prison, Warden Rudolph Hazen (James Cromwell), wishing to boost his prison's reputation for future elections as State Governor, 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 an inmate team to play against the guards. He does so with the help of a 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 by gathering 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 lets 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, 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, losing a lot of respect for Hazen as he's left with a shocked look on his face. Crewe returns it to Hazen, telling him to "stick it in [his] trophy case." Moss (Michael Irvin) 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?!"
The movie was filmed at the New Mexico State Penitentiary on Route 14, Santa Fe, New Mexico. The football game at the end of the film was filmed at Murdock Stadium at the El Camino College in Torrance, California. The car chase scene was filmed whereabouts in Long Beach, California. Other parts of the film were filmed in Los Angeles and New Mexico. The golf course scene was filmed at Lost Canyons Golf Club in Simi Valley, California.
The film did well at the box office. Its $47.6 million opening weekend was the largest of Sandler's career and only second to The Day After Tomorrow as the largest opening by a movie that was not #1. The film would go on to gross $158.1 million in the United States and Canada and $190 million worldwide. It was the highest-grossing film produced by MTV Films, until it was surpassed by Hansel and Gretel: Witch Hunters. Despite the large number of remakes released at the theaters, it's worth noting that The Longest Yard is the highest grossing comedy remake of the modern box office era (from 1980 on).
The overall critical response was mixed. It received a 31% Freshness rating on Rotten Tomatoes, though users, who rated it 62%, generally agreed that it was a play-by-play remake; the greatest complaint from critics was that it replaced the original's uncompromising violence, dark comedy and grit with juvenile humor and visual gags. Roger Ebert, in the critical minority with this title, gave it a "Thumbs Up", defending it later in his Chicago Sun-Times review as a film that "...more or less achieves what most of the people attending it will expect." In the print review, Ebert beseeches his readers to "...seek out a movie you could have an interesting conversation about", citing films not in wide release such as Dominion: Prequel to the Exorcist and Kontroll, until finally encouraging his readers to "drop any thought of seeing anything else instead" if they can see Crash. According to CinemaScore, audiences gave the film a grade of "A−" on an A+ to F scale.
The film earned Chris Rock a BET Comedy Award for Outstanding Supporting Actor in a Theatrical Film.
Burt Reynolds earned a Golden Raspberry Award nomination for Worst Supporting Actor for his performance in the film.
The official soundtrack, which consisted entirely of hip-hop music, was released on May 24, 2005 by Universal Records. It peaked at 11 on the Billboard 200 and 10 on the Top R&B/Hip-Hop Albums.
The film itself contains a mixture of hip hop and rock music, featuring music by Creedence Clearwater Revival, Norman Greenbaum and AC/DC among others.