Two just-graduated officers from Massachusetts State Police Academy follow opposite sides of the law: William Costigan is assigned to work undercover with the Irish mobster Frank Costello to get evidences to arrest him. His true identity is only known by his superiors Dignam and Oliver Queenan. The protégée of Costello, Colin Sullivan, is promoted in the Massachusetts State Police and is the informer of Costello. Each police officer gives his best effort trying to disclose the identity of the other "rat".
Leonardo DiCaprio as Trooper William Matthew "Billy" Costigan Jr.; undercover officer Matt Damon as Det. Sgt. Colin Sean Sullivan; Costello's informant in the special investigations unit Jack Nicholson as Francis "Frank" Costello; boss of the Boston Irish mob, successor to Jackie Costigan Mark Wahlberg as Sgt. Sean Dignam; second in command of the undercover unit Martin Sheen as Capt. Oliver Charles Queenan; commander of the undercover unit. (Scorsese had previously offered the role to both Robert De Niro, who had prior commitments filming The Good Shepherd[1], and Irish actor Gerard McSorley.) Vera Farmiga as Dr. Madolyn Madden; occupational psychiatrist and Sullivan's girlfriend Ray Winstone as Arnold French; Costello's right-hand man Alec Baldwin as Capt. George Ellerby; commander of the special investigations unit Anthony Anderson as Trooper Brown; member of the Special Investigations Unit and Costigan's classmate at the MSP Academy James Badge Dale as Trooper Barrigan; member of the special investigations unit and Sullivan's classmate at the state police academy