The film opens with Daniel Lugo (Mark Wahlberg) running from large numbers of heavily armed policemen, only to be hit by a police cruiser. Then the story goes back in time a few months. Lugo is a schemer and recently released convict, who served time for Medicare fraud. Sun Gym owner John Mese (Rob Corddry) hires him to increase membership and make the gym more fitness based. Lugo triples the gym's membership within three months and befriends trainer Adrian Doorbal (Anthony Mackie). Doorbal, a bodybuilder, uses steroids, which render him impotent. Lugo soon lusts after the earnings and lifestyle achieved by a new gym member he begins to train: Victor Kershaw (Tony Shalhoub), who Lugo believes is a crook. Inspired by motivational speaker Johnny Wu (Ken Jeong), Lugo decides to be a "doer" and hatches a plan to extort Kershaw for his assets by kidnapping and torturing him.
Lugo recruits accomplices Doorbal and Paul Doyle (Dwayne Johnson), a recently released cocaine-addicted convict who has turned to religion. Though Doyle is reluctant to join the team, he soon caves in after a violent altercation with his priest. This "Sun Gym gang" unsuccessfully attempts to kidnap Kershaw at home, but incapacitate him with a taser outside his deli and take him to a small warehouse he owns (which is stocked with sex toys). The kidnappers disguise their voices, but Kershaw identifies Lugo from his distinctive cologne. The scheme goes as planned otherwise: Kershaw makes calls, under duress, to provide fake explanations for his disappearance, gets his family to move out of state, and signs the documents which transfer his assets to Lugo. Lugo even bribes John Mese to notarize documents in Kershaw's absence, by presenting documents signed by Kershaw and using Kershaw's money to sponsor the Sun Gym.
The Sun Gym gang is able to collect Kershaw's money and assets, but they realize releasing him is a bad idea. Therefore, Lugo concocts a plan to kill Kershaw by forcing him to drink liquor and crash his BMW, making it look like a drunken accident. When Kershaw survives the crash, the gang burns the car with Kershaw in it. Kershaw escapes the blazing vehicle, so the gang runs over his body and leaves him for dead. Unbeknownst to them, Kershaw survives and is hospitalized. The Sun Gym gang members spoil themselves with Kershaw's riches. Lugo takes over Kershaw's car and his home in a ritzy Miami suburb; Doorbal marries his nurse, Robin (Rebel Wilson), and uses his cut to purchase penile erection treatments; and Doyle abandons his restraints of religion and sobriety and fritters away his money on cocaine and his new stripper girlfriend.
Kershaw reports what happened to the police, but they are turned off by his unpleasant manner and don't believe his bizarre story, particularly because of his blood alcohol level. He then contacts Ed Du Bois, III (Ed Harris), a retired private investigator, who declines to take the case but warns Kershaw to quickly leave the hospital before the gang returns to kill him. The gang learns of Kershaw's survival and goes to the hospital to kill him, but the plan fails because Kershaw has taken Du Bois's advice and fled. Upon reflection, Du Bois takes Kershaw's case and tails the Sun Gym gang. Meanwhile, Doyle has wasted all of his cut and attempts to rob an armored car. However, dye-packs planted in the money bag explode, and he narrowly escapes the police, getting his toe shot off. He and Doorbal - who depleted his share on payments for treatments, his and Robin's wedding, and a new home - explain to Lugo they need more money, and they propose another kidnapping.
They target Frank Griga (Michael Rispoli), who owns a phone sex operation. After a promising discussion at Griga's mansion, the gang invites Griga and his wife Krisztina Furton (Keili Lefkowitz) to Doorbal's home to propose an investment scheme. However, Griga insists on meeting with someone more experienced and questions Lugo's amateurish business savvy. This angers Lugo, who attacks Griga. Griga fights back, and Lugo accidentally kills him. Krisztina discovers this and tries to shoot Lugo, but Doorbal injects her with a horse tranquilizer. Lugo and Doyle try to use codes obtained from a heavily sedated Krisztina to open a safe at her and Griga's home, but the codes do not work. When Krisztina rouses and tries to escape, Doorbal gives her a second injection, accidentally killing her.
Lugo and Doorbal purchase equipment to dismember the bodies and dump the body parts in several barrels, which they sink in a lake, while Doyle incinerates their hands (on a barbecue grill) to eliminate their fingerprints. Doyle loses his sanity over the violence and gore, leaves the gang, and returns to the priest's church. The police learn of Griga and Krisztina's disappearances, and with evidence from Ed Du Bois, they set a plan to arrest the Sun Gym gang. The film returns to June 17: the police arrest Doyle at the church, Doorbal at home, and Mese at Sun Gym. Lugo sees the raid and flees. Although he is hit by a police car, he escapes and heads out by sea in Kershaw's go-fast boat. Kershaw and Du Bois deduce Lugo is going after Kershaw's hidden bank account in the Bahamas and accompany the police to capture him. Lugo's pursuers catch up with him and Lugo runs. Du Bois shoots him, Kershaw chases Lugo in a car and incapacites him, and the authorities arrest him. Lugo is brought back to the United States and stands trial with Doyle, Doorbal, and Mese.
At the trial, it is revealed that Robin divorced Doorbal the night before she testifies against him. Doyle (a composite of gang members; see the "Comparisons" section below) has an attack of conscience, confesses, and testifies against Lugo; he is sentenced to 15 years in prison, serves seven years, and goes free. Lugo and Doorbal receive death sentences and sit on death row in Florida. Mese is sentenced and dies in prison. Doyle's stripper girlfriend, Sorina Luminita, is not charged.