In 1988 in Brooklyn, New York, Bobby Green (Joaquin Phoenix) is the manager of the successful El Caribe nightclub in Brighton Beach that is frequented by Russian black market gangster and drug lord Vadim Nezhinski (Alex Veadov), and owned by Marat Buzhayev, Vadim's uncle and Bobby's boss.
Bobby has distanced himself from his father, NYPD Deputy Chief Burt Grusinsky (Robert Duvall), and his brother, Captain Joseph Grusinsky (Mark Wahlberg). He uses the maiden name of his mother, Carol Green, as his last name, preferring to remain on the sidelines and enjoy a hedonistic life with his girlfriend Amada Juarez (Eva Mendes) and best friend Louis "Jumbo" Falsetti (Danny Hoch).
When Joseph leads a police raid on El Caribe in the hopes of arresting Vadim, Bobby refuses to cooperate. The incident strains Bobby's relationship with his father and brother even more, to the point that Bobby and Joseph come to blows.
The police are unsuccessful in making a case against Vadim, who decides to retaliate. The next evening, Joseph is shot by a masked assailant, and his unmarked police cruiser firebombed. Joseph survives the ambush, but is hospitalized for four months. Vadim, unaware of Bobby's family ties, confides that the Chief will be the next victim. Bobby resolves to help the police. Without his father's knowledge, Bobby goes undercover inside Vadim's cocaine-smuggling operation with a police listening device hidden in a cigarette lighter, but when the device is discovered, he narrowly escapes being murdered, and the police raid the operation and arrest Vadim.
Bobby and Amada are placed in protective police custody, and their relationship begins to deteriorate. Months later, Vadim escapes custody while being transported to a hospital. The police prepare to move Bobby and Amada to a new location. During a blinding thunderstorm, the police convoy is intercepted by Vadim's men, and during a chaotic car chase, Burt is fatally shot. Bobby passes out in the rain when he sees his father's body.
The police take Bobby and Amada back to a hotel near Kennedy Airport. Bobby wakes up a few hours later and finds Joseph in the hotel room. After Joseph tells him that their father died, the grief-stricken Bobby asks how "they" found them. At the subsequent funeral, a colleague of Joseph's, Captain Jack Shapiro, gives him Burt's Korean War medal. Bobby is told that a Russian shipment of cocaine is arriving sometime in the coming week.
To avenge his father, Bobby decides to officially join the police force without the consent of Amada, who leaves him. After he is sworn into the NYPD, Bobby learns the true involvement of Jumbo, his friend, and Marat, Vadim's uncle. He and Joseph organize a final sting operation, set for April 4, 1989. During the raid, Joseph is emotionally incapacitated by the memory of his shooting and cannot continue. Vadim flees into the reed beds, and the police toss in flares to smoke him out. As the beds are engulfed in flame and smoke, Bobby runs in to find Vadim himself, ignoring the other officers' pleas that he wait. Bobby shoots Vadim in the chest, mortally wounding him.
Nearly a year after the raid on El Caribe, Bobby, now in uniform, graduates from the NYPD Police Academy to become a full-time police officer. Before the ceremony, Joseph reveals to Bobby that he has decided to switch to a job in the administration sector, since the shooting led him to realize that he needs to spend more time with his children. As the chaplain announces that Bobby is to give the valedictorian address, Bobby thinks he sees Amada in the audience, but it turns out to be an illusion. Bobby and Joseph express their brotherly love.
Output: Who goes undercover to help the police?