Detective Mole

WARNING: The presence of any work on this list may well constitute a spoiler.

Among the various cops, forensics people, etc., working on a crime scene in fiction, there's a good chance that one person on the team will know a lot more about what happened than everyone else present ... because they committed it.

In real criminal investigations, it's not uncommon for the offender to somehow attempt to insert himself/herself into the investigation to keep tabs on it, or for ego's sake. In this trope, it happens that the offender is actually an official part of the investigation, and is quite probably cheerfully leading Detective Patsy astray as much as possible.

This applies to any crime. The defining characteristic is that one of the investigators is in fact the perpetrator, whether the audience knows it or not. Compare Bruce Wayne Held Hostage, Hired to Hunt Yourself.

''Again, spoilers below. This is your warning. Proceed at your own risk.''

Anime and Manga

 * Death Note. It isn't a particular murder, but a massive supernatural killing spree...but the killer is still called in to investigate.
 * Though this is because L, the lead detective is the world's best three detectives, and has called in Light, both because he is useful as a detective, and because he has a high probability of being the killer, presenting the chance for the lead detective to get into his mind. This was his stated purpose in bringing in Light.
 * Played straight in Death Note: Another Note. Naomi Misora is very impressed with
 * of Magical Girl Lyrical Nanoha, who's both part of the investigation group on a killing spree and the true mastermind behind said killing spree.

Film

 * In The Departed, Matt Damon plays a Boston cop and mole for Jack Nicholson's criminal empire who is charged with finding the mole in the Boston police department (himself). The Departed was an adaptation of a Hong Kong film titled Infernal Affairs.
 * In Saw IV, Detective Mark Hoffman is revealed to be Serial Killer Jigsaw's second protègè.
 * In Ocean's 12 and 13 an Interpol agent (in 12) and the main FBI agent investigating the gang (in 13) turn out to be respectively Linus' mother and father, and actually help the con.
 * In Ace Ventura, a murder and two kidnappings (one dolphin and one Dolphin) were investigated by police chief Lois Einhorn.
 * Judge Doom is ostensibly the one looking for the one responsible for murdering Marvin Acme in Who Framed Roger Rabbit. Of course, he's the one who committed the murder.
 * In The Sting the FBI agents who assist Lieutenant Snyder in his pursuit of Robert Redford and convince him to help their investigation are revealed to be the final part of the sting.
 * With the exception of John Hartigan, every cop in Sin City is working for the bad guys. The only difference is that there is no reason to keep it a secret.
 * In No Way Out, the three main characters involved in the investigation of a Pentagon-related murder that is blamed on a supposed Soviet mole are each guilty of a crime. One is the actual murderer, another is helping him frame someone else for said murder, and the third.

Literature

 * This happens in several Agatha Christie novels. A few examples would be:
 * In Hercule Poirot's Christmas the murderer turns out to be.
 * In The Murder of Roger Ackroyd,.
 * In Curtain the murderer is
 * In Gaston Leroux's novel The Mystery of the Yellow Room, the murderer turns out to be.
 * in The Winter Queen. He wasn't directly involved in the crime itself, but.
 * Michael Slade's RCMP novels are fond of this trope, using it with a Mountie in Headhunter and a forensics analyst in Primal Scream.
 * Roma Sub Rosa used this once.
 * Mackerel by Moonlight, whose real claim to fame is that the author was governor of Massachusetts until right before it was published.
 * In Val Mcdermid's The Distant Echo, four students literally stumble upon the body of a young woman, and are immediately suspected of the crime. The reader is lead to wonder if it was one of them who killed her, and in that case who. As it turns out, the real killer is
 * The murderer in Isaac Asimov's The Caves of Steel is.
 * In the Lord Darcy novel Too Many Magicians, the true identity of the murderer/Polish spy known as 'Goodman Fitzjean' is.
 * Time Scout: Sid Kaedermann insinuates himself into the rescue mission for his own victims.

Live Action TV

 * In the first-season Dexter episode "Return to Sender", Dexter gets called to the scene of one of his own murders.
 * And again at the beginning of the third season where Dexter takes someone through how their brother was killed. Beforehand he had the opportunity to pick up some evidence he dropped.
 * In fact he was called in when someone mistakenly tried to copy Dexter and ended up in several trash bags. Actually looking over his own crime scenes happens a lot.
 * Oh yeah, and then there's the entire second season, which Miami Metro PD and the FBI spent looking for the Bay Harbor Butcher and Dexter spent evading them.
 * In The Mrs. Bradley Mysteries, the killer in the final episode turns out to be.
 * In season 3 of Nip Tuck, serial killer The Carver turns out to be.
 * The third episode of Pushing Daisies has Ned called in to investigate the "accidental involuntary manslaughter" he was responsible for in the first episode.
 * Memorably used in the pilot episode of Hustle, in which the lead investigator uncovering the crew's confidence schemes is actually a fellow conman, who vanishes with all the cops' evidence before his ruse is uncovered.
 * In the Season 1 finale of Damages, the man who killed the protagonist's fiancee is seen returning to the crime scene to recover a crucial piece of evidence left behind by his accomplice. As he snatches the evidence up and pockets it, one of the cops investigating the case bursts in on him... and greets him as a fellow detective, introduces him to the protagonist, and offers to show him around the crime scene.
 * There was an episode of Monk, possibly "Mr. Monk and the Captain's Marriage", where the killer turned out to be the cop who claimed to be sleeping with Stottlemeyer's wife. (He'd lost a tooth down a grate in a fight with the victim, and he needed Stottlemeyer to punch him in the face so that when the tooth was found at the crime scene it wouldn't incriminate him.)
 * In the Psych episode "Psy vs. Psy", Shawn competes with a rival psychic who turns out to be getting her information about a robbery from having been in on the crime. When Shawn puts the amount of stolen money much higher than she does, she realizes her partner is going to double-cross her, kills him, and shows up to investigate the murder. At the crime scene, she touches the body while "psychically reading" it to explain the presence of her DNA.
 * Methos from Highlander the Series probably qualifies, as he's in charge of the division of Watchers who are trying to find him.
 * This happens in a Mad TV sketch about what it would be like if psychic detectives were real. The medium examines the scene, declares it a perfect murder with no clues, gets a psychic impression, and immediately and easily divines that the investigator did it. Busted.
 * Midsomer Murders has one where a large sum of money goes missing, with two Jerkass "special ops" types are sent to help. Troy immediately sucks up to them, despite their contempt. In the end, it turns out they were in on the heist, with their own boss masterminding (and having done the murders, which wasn't part of the plan).

Tabletop Games

 * The board game Clue, possibly (and definitely if you're playing with six players).
 * Hilarious in the SNES version, where a cutscene will play out where the winner deduces the killer and the killer gets taken away by the cops while cursing the winner. The first time I played, I was both. "Prof. Plum: The killer was Prof. Plum. [...] Curse you, Prof. Plum!". Also, that apparently still counts as a win.

Theatre

 * The Bat reveals in the end that the man who introduced himself to Cornelia in the first act as the detective Mr. Anderson is actually the Bat, who beat up the real Mr. Anderson and tied him in the garage.

Video Games

 * in Persona 4
 * in Ace Attorney, not actually
 * Also in Investigations, who
 * If we're adding in lawyers (who practically function as detectives in the games), we have.
 * from Heavy Rain, who is

Western Animation

 * No connection whatsoever to Hanna Barbera cartoon star Morocco Mole, who is an assistant detective who happens to be a mole.

Real Life

 * Dr. Harold Shipman wrote the death certificates for his victims, to make the deaths out to be natural.
 * FBI agent Robert Hanssen, who sent enormous amounts of intelligence to the Soviet Union and later Russian Federation during a career as a spy that lasted over twenty years, was at one time head of a task force charged with ferreting out the suspected mole in the FBI--himself.
 * The film Breach is based on this story
 * Kim Philby was head of the counter-espionage section of British intelligence agency MI 6 for two years, while all the time he was a spy for the Soviet Union, and thus charged with stopping himself before he defected.
 * Dennis Rader, the B.T.K. Killer, took a job for the security firm ADT Security Services shortly after beginning his series of murders. Part of his job was installing home alarms, and they were sometimes touted as helping protect people from B.T.K. He once reported one of his own murders to the police from a phone box just a few blocks from his offices. In addition, during this time he was studying for a degree in Criminal Justice- he wanted a thorough knowledge of law enforcement procedure.