Criminals Robert “Bobby” Beans (Denzel Washington) and Michael “Stig” Stigman (Mark Wahlberg) are questioned by the United States Border Patrol after a meeting with drug lord Manny “Papi” Greco (Edward James Olmos) in Mexico. Unknown to Stig, Bobby is an undercover DEA agent named Bobby Trench and reports to his superior, Jessup (Robert John Burke), that he failed to acquire cocaine from Papi that they could use as evidence to convict him.
Against Jessup’s orders, Bobby decides to remain undercover and assist Stig in robbing $3 million – stashed in the vault of the Tres Cruces bank – from Papi, so they can prosecute Papi for money laundering. Bobby has a rendezvous with fellow DEA agent and former lover, Deb Rees (Paula Patton), who is also seeing another man, while Stig, an enlisted Navy SEAL undercover with ONI, meets with his commanding officer, LCDR Harold Quince (James Marsden), who instructs Stig to kill Bobby so the Navy can use the stolen money to fund unauthorized covert operations.
During the heist, Bobby and Stig are surprised to find $43.125 million in the vault instead of the expected $3M. After the heist, Stig follows orders to betray Bobby and escape with the money, managing to pull his gun right as Bobby is about to pull his own. Unwilling to kill Bobby, Stig wounds Bobby in the upper arm, and then sees Bobby’s DEA badge. Not sure what to think of Bobby, he leaves Bobby behind in the desert and leaves with the money. Stig meets with Quince, and after learning what happened, Quince attempts to have Stig killed. Stig escapes after learning the money will be transferred to a Navy base in Corpus Christi. Meanwhile, a man named Earl (Bill Paxton) aggressively interrogates the Tres Cruces bank manager about the stolen money and also questions, shooting his knee, the vet who treated Bobby’s wounds as he tracks Bobby’s movements.
However, Bobby goes to Stig’s apartment to find out where he took the money, only to have Stig contact him from a sniper’s post across the street. A hit squad sent by Quince attacks the apartment but Bobby and Stig escape. Bobby visits Jessup to tell him what happened, but Earl and his men are there waiting for him. Earl kills Jessup, frames Bobby for the murder and lets him go, making a deal that if Bobby returns the $43 million he will be cleared.
Bobby and Stig kidnap Papi and interrogate him in the garage at Deb’s house. They find out Earl is a black ops operative to whom Papi reports, and that the money they stole was from payments to the CIA. The CIA has strong armed Papi, as well as other cartels, into paying a 7% cut in exchange for using CIA planes to help smuggle product across the border. The garage is attacked by another hit squad, led by Quince. Bobby, Stig, and Deb escape, but so does Papi, who calls his crew. All three end up being captured by Papi, and taken to his farm in Mexico. After beating them and receiving a visit from Earl, Papi gives the pair 24 hours to steal the money from the Navy and return it to him, or Deb will die.
At the base, Bobby infiltrates Quince’s office, only to discover Quince is Deb’s boyfriend, and they had planned to steal the money for themselves. Meanwhile, Stig asks Admiral Tuway (Fred Ward) for help. Tuway orders Quince’s arrest, but disavows Stig to prevent the scandal from tarnishing the Navy’s reputation. Quince evades arrest, as does Stig. Unable to find the money, Bobby is too late to prevent Papi from killing Deb. He later realizes that the money is in a motel room that he and Deb frequented and goes to help Stig, who had returned to Papi’s farm alone to exact vengeance.
There, Stig is surrounded by Papi’s men until both Quince and Earl intervene. Bobby arrives in a car filled with money, and then blows up the car, scattering the money everywhere, which leads to a massive shootout. During a standoff among Quince, Earl, Bobby, and Stig, Earl reveals that the CIA has 20 other secret banks, and the loss of the $43.125 million is only a minor setback. Signaling Stig with a phrase from an earlier conversation, Stig shoots Earl, and Bobby shoots Quince. Bobby and Stig kill Papi and the duo escape, but not before Bobby shoots Stig in the leg as payback for shooting him in the desert. While planning to continue to take down the CIA’s secret banks and sabotage their black operations, Bobby reveals to Stig that he did not blow up all the money and had some stashed away.