Brian and Mike inadvertently interfere with the local cartel's business and are marked for death. The pair are lured into an ambush and both are shot. Brian survives his wounds, but Mike is killed, leaving behind his wife and daughter.
Brian Taylor (Jake Gyllenhaal) and Mike Zavala (Michael Peña) are two beat cops in LA, both of whom are clean cops and good at their job. They are also best friends and consider each other to be brothers. Brian is making a documentary of his work.
The two work in a tough neighborhood, where the Latin Kings (a Latino gang with cartel support) are feuding with the African American gangs (who have a respect for the way Brian and Mike work). After making a bust of a wealthy Latin King gang member, Brian convinces Mike to search the gang member's house. They stumble upon and break up a human trafficking ring operating from there. The two are immediately confronted by federal agents, who warn them to lie low as this bust and connected arrests they have made have attracted the notice of the Mexican cartels.
Meanwhile, Mike has his first baby with his wife (who was also his childhood sweetheart) and Brian falls in love with Janet (Anna Kendrick). The two are also considered rising stars in the department. One of the African American gang members warns them that the cartel has placed a price on their head, but they refuse to believe him.
One night, Brian and Mike follow a suspect into an apartment building, only to discover that the Latin Kings have set up an ambush for the two. A heavy gun fight breaks out, but Mike and Brian manage to shoot their way out into an alley. Unfortunately several gang members lie in wait for them there and they shoot Brian. Mike kills them and then covers Brian's unconscious body while he is surrounded by gang members who quickly open fire on the two. Many police reinforcements show up soon after and take out the gang, but neither Brian nor Mike are conscious.
We cut to the future to see everyone attending a funeral. It turns out that Mike was killed, but he managed to successfully shield Brian, who is still alive. Brian gives the eulogy, but is so sad that he can only state that Mike was truly "his brother." The film ends with Brian remembering the last happy conversation he shared with Mike.