The film opens with a montage, mixed in with the credits, of De Niro and Pacino shooting targets with pistols and machine guns while cracking jokes to one another. De Niro's character is a hotheaded character nick named 'Turk' while Pacino is a brilliant detective nicknamed Rooster. This is shown at the beginning of the movie during the credits with De Niro quickly getting into an argument with an ump during a children's baseball game and threatening suspects. At the same time, it shows Pacino defeating multiple opponents in chess at the same time. The movie then cuts to footage of Turk staring into the camera confessing to murders of 14 people. Turk narrates the entire movie with his 'confessions' while the film shows flashbacks of some of the murders that took place before the events of the film.
Then the movie cuts to Turk and Rooster, who are working on taking down a drug dealing club owner named Spider (50 Cent). They plant a wire on a female lawyer who was caught using drugs that she purchased from Spider; they want to catch him in the act. Spider becomes suspicious due to the massive amount of blow that she wants to purchase and grabs her and finds the wire on her. Turk and Rooster rush into Spider's office and get her out of there, but not before engaging in some trash talk with Spider. While they are leaving, Spider's bodyguard is hiding behind a wall with a handgun. Rooster sees the bodyguard pointing a gun at them and him and all hell breaks loose and a shoot out begins with Rooster and Turk killing Spider's body guard and their mole gets shot in the chest as well. While Rooster begins to call an ambulance, Turk handcuffs Spider to the banister in Spider's office and begins to beat him up and has to be pulled away by Rooster.
As a result of the incident with Spider, Turk and Rooster are ordered by their Police Lieutenant (Brian Dennehy) to begin sessions with a therapist. Turk and Rooster generally play with the therapist during the sessions and give smart assed answers. But the therapist also give Turk and Rooster little note books for them to write down whatever feelings they have to get off their chest
Then the film shows Turk and Rooster sitting in court watching as a rapist gets off. Turk is furious and begins to publicly threaten the suspect and has to again to be restrained by Rooster. The next scene shows the rape suspect being shot to death in his apartment, but you don't see who the killer is. The killer leaves behind a poem for the detectives to read as a clue. The rape suspect was just the latest in a line of criminals who had been murdered and a poem was left at the scene (he one of the people that Turk 'confessed' to killing). Also investigating the murders are Detectives Perez (John Leguizamo) and Riley (Donnie Wahlberg). There is tension between Turk and Perez due to Turk currently dating Perez's ex girlfriend, Detective Karen Kleisner (Carla Gugino).
While investigating the murder of the rape suspect, Rooster comes to the conclusion that due to the lack of struggle in the murder as well as all of the recent murders, that the murderer must be a cop. Perez and Riley become perceptive to the idea while Turk becomes upset with the notion that a cop could be a murderer. Perez and Riley now begin investigating with the notion that the killer is now a cop.
Rooster and Turk look at a convict in prison who that they had put away for similar murders before, Charles Randall (Frank John Hughes), but it doesn't turn out to be him. A flash back reveals that Randall had gotten off on a murder charge before hand so Turk, despite Rooster's attempts to stop him, had planted fake evidence to another murder to get a conviction on Randall.
Kleisner is looking at old evidence when she realizes that Randall's conviction doesn't match up and takes it to Perez and Riley, who begin to suspect that Turk is the murderer and is framing others to cover up his crimes. Perez and Riley begin to suspect Turk even more when he makes an off hand suggestion to them that a possible suspect in the murders could be a former cop who was fired for corruption on the job that used to work with Turk. Perez and Riley investigate it, but it leads to nowhere quickly when the man has an alibi. Perez and Riley begin to suspect that Turk is trying to throw them off track and they take it to the Lieutenant, who shares it in a conversation with Rooster. Rooster denies that Turk is involved in anything but is told to keep his eyes open by the Lieutenant and not to mention anything to Turk.
Meanwhile, Rooster invites Perez and Riley out to a bar for a meeting. He brings along with him a woman who confesses to lying on the stand to protect Randall during his trial. Randall had threatened to kill her if she did not provide an alibi for him. After she leaves, Rooster confesses to his role in planting evidence against Randall, but does not implicate Turk. Rooster then agrees to work with Perez and Riley on investigating Turk, but is adamant that they will not find anything.
Meanwhile, someone shows up to Perez's house and tries to shoot him through his door. Perez survives with minor wounds to his face. He suspects that it was Turk and gets into a fight with him and has to be pulled away by Riley. Things get even worse for Turk since he had begun to suspect that Perez and Kleisner were having an affair together (they were actually just working the case together) so his tension with Riley makes him look even worse.
Turk and Rooster are in a bar, talking about their therapy sessions when they begin talking about their notebooks that the therapist gave them. Turk admits that he has never even written in it, thinking of the entire thing as a joke. Rooster pulls his out and shows that he has been writing in the notebook all along, but refuses to show it when Turk asks to see it. While at the bar, they see a Russian gangster named Yevgeny Mugalat (MMA fighter Oleg Taktarov) talking to associates of his.
Later on, Kleisner heads home but is followed by a car. She goes upstairs and notices that the car is still parked outside. She calls Turk and asks him to come over. Moments later there is a knock on the door and it is Turk, Kleisner draws her gun on him asking him how he got here so fast. Turk takes her gun away and asks her if she trusts him. She says yes. Turk then demands that she get him information on everything Perez and Riley have on him. She agrees. Meanwhile, Mugalat is shot by the killer and a poem is left behind. But when Mugalat survives, Rooster and Riley go to question him but they cannot due to his condition. Riley has a guard placed for protection outside of his door 24 hours a day. Mugalat is the person who has seen the killers face and needs to be protected. Later on, it shows someone walking right past the sleeping police officer guarding the room planning on suffocating Mugalat but they are stopped by another police officer and the killer, who cannot be seen still, is called 'detective'.
Turk is called by Spider, who is out of jail, who tells Turk that he has information on the murder weapons and someone who had stolen them. Turk agrees to meet up with Spider at his club for the information. Spider gets off the phone and it shows Perez and Riley standing behind him. Spider is working as a mole for Perez and Riley and they are hoping to catch Turk in the act of attempting to kill Spider.
Kleisner is shown in her apartment and you hear someone come in. She is getting ready to get into the shower when she is grabbed. She is beaten up and then raped by the killer. It doesn't shown anything, but you can hear her screaming and pleading for the killer to stop. She is left alive, but badly injured. She calls the Lieutenant to tell the identity of the killer, but he doesn't believe her. She goes to Mugalat, who is now awake, and shows him a picture of the man who assaulted her. Mugalat positively identifies the man in the picture as the one who shot him.
Meanwhile, Turk is meeting with Spider while Perez, Riley and Rooster watch everything on camera. Rooster still does not believe that Turk is the serial killer and even bets money on it ($400 with Perez and $500 with Riley). But Turk begins to appear as if he is going to kill Spider and pulls out his gun and says he prepared a special poem for him when the three detectives bust in and take Turk's weapon. Rooster grabs Turk's poem and reads it aloud, it’s a confession saying that he knew that the entire thing was a sting operation all along and laughs at Perez and Riley's obvious attempt. Rooster begins to brag about how he now has won a thousand dollars (actually $900) thanks to Turk. A dejected Perez and Riley tell Turk that they are not done investigating him and leave Spider's club. Spider makes a phone call, while Turk sits down in a chair and Rooster briefly leaves the room. Rooster leaves his notebook on the chair (the same one that he wouldn't let Turk read earlier). Turk begins to read the notebook, while in the background it shows Rooster walk up to Spider (who is still on his cell phone, staring out the window) and shoot him in the head. Spider's body flies out the window and hits the ground below.
Apparently Rooster has been the murderer all along, not Turk. Rooster then points his gun at Turk and tells him to read the notebook out loud and look into the camera in Spider's office while doing it, which is where the footage of Turk confessing to the murders comes from; he's reading Rooster's notebook into the camera. Turk is reading the notebook which goes over all of murders Rooster committed when he comes across a passage in the notebook that says the greatest day of Rooster's life was when he decides to stop emulating Turk. Turk asks what this means. Rooster says that Turk has always been his idol and the guy in the force he looked up to. But when Turk planted evidence to convict Randall, Rooster lost faith in the system and in his idol. Quickly growing tired of the cat and mouse game of police work afterwards, Rooster began to kill the criminals who were getting off due to lack of evidence or technicalities. Rooster tells Turk that after the 1st murder he committed, he became easier and easier to the point where killing is the only thing that gives him satisfaction in life. He says that when Mugalat lived, he knew he was about to get caught and did unforgivable things. A flashback shows Rooster raping Kleisner. He tells Turk that he will take the blame for everything, including planting the evidence against Charles Randall and walks away. Turk asks him where his going, Rooster responds that he is probably going to hell.
Turk begins to follow Rooster as he tries to escape. Turk, who is unarmed, catches up to Rooster and asks him to stop all of this. Kleisner arrives, with a gun, at the scene and wants to kill Rooster for raping her. Turk is standing in between the two of them as Rooster taunts Kleisner and then runs off. Turk takes her gun and begins to chase Rooster, throughout the club (which is just a small part of a mostly vacant warehouse). Rooster finally appears to be escaping through a warehouse door, but the door is padlocked. Rooster tries to shoot the lock off but it doesn't work. Turk catches up to Rooster and asks him to surrender. Rooster won’t go to jail though and begins to fire at Turk, intentionally missing though, so Turk will have no choice but to fire back. Rooster taunts him and recites a poem about his righteous kills and then says that they are going to need a 10/13 (officer down call) and points his gun at Turk, leaving him no choice but to shoot him several times. Rooster is dying, but Turk calls an ambulance and tells them that an officer is down. Rooster has Turk change it though and has him say that a suspect is down and not to send an ambulance because it wont be needed. Rooster dies shortly afterwards and Turk folds Rooster's arms over his body.
The next scene shows Turk and his superior officers watching the video of him reading Rooster's notebook confessing to all the murders. One of the superior officers than said something to the extent of that the case died with David Fisk (Rooster's real name), possibly meaning that Rooster will not be exposed as a murder. The final scene shows Turk and Kleisner sitting together on a bench as Turk gets ready to coach his little league girls softball team.