Frank Costello (Jack Nicholson) heads a local organised crime unit in Boston. In order to gain inside information about the police actions, he infiltrates a few of his trusted comrades into the police force through police academy. One of them is Colin Sullivan (Matt Damon) who quickly rises to powerful position in police force with his wit. On the other hand, the police chief Oliver Queenan (Martin Sheen) has played the same game on Costello by putting one of his shrewd officer, Billy Costigan (Leonardo DiCaprio), in the gang. Billy gains the confidence of Costello and soon becomes his left hand. Both Billy and Colin live a dangerous life gathering and transfering the information about plans of the agency they penetrated. Soon it becomes clear to both the parties that there is a mole amongst them. This leads to a cat-and-mouse game where both the groups desparately seek to identify the mole amongst them, leading to ample bloodshed.