The Departed is a 2006 American crime thriller film, fashioned as a remake of the 2002 Hong Kong film Infernal Affairs. The film was directed by Martin Scorsese and written by William Monahan. Like Infernal Affairs before it, The Departed is noted for its star-studded cast, including Oscar, Golden Globe, SAG, Emmy and/or BAFTA nominated/winning actors Leonardo DiCaprio, Matt Damon, Jack Nicholson, Mark Wahlberg, Martin Sheen, Ray Winstone, Vera Farmiga and Alec Baldwin. It won four Oscars at the 79th Academy Awards; Best Picture, Best Director (Scorsese), Best Adapted Screenplay and Best Film Editing. Wahlberg was nominated for Best Supporting Actor but lost to Alan Arkin for his role in Little Miss Sunshine. The film takes place in Boston, Massachusetts, where Irish Mob boss Francis "Frank" Costello plants Colin Sullivan as an informant within the Massachusetts State Police. Simultaneously, the police assign undercover cop William "Billy" Costigan to infiltrate Costello's crew. When both sides realize the situation, each man attempts to discover the other's true identity before his own cover is blown.
At a young age, Colin Sullivan (Damon) is introduced to organized crime through Irish mobster Frank Costello (Nicholson) in the Irish neighborhood of South Boston. Costello trains him to become his mole inside the Massachusetts State Police. Sullivan is accepted into the Special Investigations Unit, which focuses on organized crime. Before he graduates from the Police Academy, Billy Costigan (DiCaprio) is asked by Captain Oliver Queenan (Sheen) and Staff Sergeant Sean Dignam (Wahlberg) to become an Undercover Agent, as his childhood and family ties to organized crime make him a perfect infiltrator. He drops out of the Academy and does time in prison on a fake assault charge to increase his credibility. As both infiltrate their respective organizations, Sullivan begins a romance with psychiatrist Madolyn Madden (Farmiga). Costigan sees her for his probation and also develops a relationship with her. Shortly after, Costigan makes love to her before she moves in with Sullivan. After Costello barely escapes a sting operation, both moles become aware of the other's existence, though not their respective identities. Sullivan is told to find the "rat" and asks Costello for his underlings' personal information (birthdates, Social Security numbers, etc.) to determine who is the informant within Costello's crew. Costigan follows Costello into a pornographic movie theater where Costello gives Sullivan an envelope with the details. Costigan then chases Sullivan through Boston's Chinatown district. When it is over, both men still do not know each other's identity. Sullivan then has Queenan tailed as he meets Costigan in an abandoned building. Sullivan sends Costello's men in and Queenan distracts them to let Costigan escape. He is thrown from the roof and dies at the feet of Costigan. When the mobsters escape, Costigan pretends he has come to rejoin them. The trailing State Troopers open fire on Costello's crew, which causes casualties on both sides. Later, at one of Costello's safe houses,a mortally wounded Delahunt (Mark Rolston), one of Costello's enforcers, tells Costigan "I gave you the wrong address, but you showed up at the right one." He then asks him if he knows why he didn't say anything about it before dying. When Costello's henchman "Fitzy" (O'Hara) does an unsuccessful job of hiding the corpse, it is revealed that Delahunt was also an undercover police officer. Costello berates the rest of his crew for believing this, knowing that the more likely explanation is that the police declared Delahunt an informant in an attempt to stop Costello himself for continuing his search for the mole. Now under scrutiny, Sullivan is attacked by a suspicious Dignam because of Queenan's death. Captain George Ellerby (Baldwin) places Dignam on leave. Using Queenan's phone, Sullivan calls Costigan, who refuses to abort his mission. Sullivan learns of Costello's role as an informant for the FBI from Queenan's diary, causing him to worry about his dual identity being revealed. Sullivan calls Costello to inform him he has a tail as he and his men drive to a cocaine drop-off. Costello furiously demands that Sullivan gets rid of the tail, to which he agrees. Fed up with Costello's arrogance, along with the knowledge that he is an FBI informant, Sullivan gets rid of the tail and convinces Ellerby to a special ops strike at the drop-off where is intends to confront Costello. With Costigan's help, Sullivan tracks down where the drop-off is located. Costello and his crew become trapped in a gunfight with Police, resulting in most of the mobsters being killed. As Costello attempts an escape he is confronted by Sullivan. Costello admits he is an occasional FBI mole and tries to shoot, but Sullivan fires first, fatally hitting him. Near death, Costello tries to shoot Sullivan again, but Sullivan dodges the shot and returns fire, killing Costello. With Costello dead, Sullivan is applauded the next day by everyone on the Force. In good faith, Costigan comes to him for restoration of his true identity, but notices an envelope containing details of Costello's men on Sullivan's desk and flees, realizing that Sullivan is Costello's inside man. Knowing he has been found out, Sullivan erases all records of Costigan from the Police computer system. Costigan leaves an envelope in the care of Madolyn and tells her he will talk with her in two weeks. Later, she reveals to Sullivan that she is pregnant, but it isn't revealed who the father is. Soon after, she discovers a package in the mail from Costigan to Sullivan. It contains a CD and a phone number for Sullivan. Madolyn listens and discovers that it contains recordings of Costello's conversations with Sullivan. Sullivan walks in on her and tries to assuage her suspicions, but she locks herself in the bathroom. He hastily contacts Costigan, who reveals that Costello recorded every conversation he had with Sullivan. Since Costigan was the only person Costello actually trusted, Costello's attorney left Costigan in possession of the recordings and therefore Costigan intends to implicate Sullivan. They agree to meet at the building where Queenan was killed. On the roof, Costigan catches Sullivan off-guard, assaults him and hand-cuffs him at gunpoint. As Costigan had secretly arranged, Trooper Brown, (Anderson)Costigan's class mate at the Academy, appears on the roof as well. Shocked, Brown draws his gun on Costigan. Costigan attempts to justify his actions by exposing Sullivan as the rat, but Brown does not fully believe him. Costigan asks Brown why Dignam did not accompany him as per their agreement, but Brown does not answer. Using Sullivan as a shield, Costigan leads Sullivan into the elevator. As it reaches the ground, Costigan is shot point blank in the head by Trooper Barrigan (Dale), another Police Officer on Costello's pay-roll. Brown reaches the ground floor and is killed by Barrigan as well. Barrigan reveals to Sullivan that Costello had more than one mole in the Police and suggests that they must avoid being traded to the FBI. Sullivan waits for Barrigan to turn then shoots him in the back of the head, leaving himself as the only survivor. At Police Headquarters, Sullivan blames all mole activity on Barrigan and has Costigan posthumously given the Medal of Merit. At Costigan's funeral, Sullivan and Madolyn stand at the grave. She is clearly distraught. Sullivan attempts to discuss the future of her child, but she ignores him. Later, Sullivan enters his apartment with groceries and, to his surprise, finds Dignam waiting for him, wearing hospital footies and surgical gloves to leave no trace of his presence and aiming a suppressed pistol straight at him. Aware of Sullivan's treachery, Dignam shoots him in the temple. As Sullivan collapses dead, Dignam calmly exits Sullivan's apartment. A rat crawls along the apartment balcony, with the view of the Massachusetts State House in the background.