%% Don't re-add non-examples that have been deleted, since there have been problems with this article in the past.
%% But by the same token, don't remove genuine examples just to avoid spoiling them! The page is already spoiler-tagged at the top.

'''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 DetectivePatsy 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 BruceWayneHeldHostage, HiredToHuntYourself.

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

----
!!Examples:

[[foldercontrol]]

[[folder:Anime and Manga]]
* ''Manga/DeathNote''. 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 [[IHaveManyNames 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 ''Manga/DeathNote'': ''LightNovel/AnotherNote''. Naomi Misora is very impressed with [[spoiler: Ryuuzaki's ability to decipher Beyond Birthday's [[CriminalMindGames codes]] when no one else can--of course it's because "Ryuuzaki" ''is'' Beyond.]]
* [[spoiler:Runessa in ''Audioplay/StrikersSoundStageX'']] of ''Franchise/LyricalNanoha'', who's both part of the investigation group on a killing spree and the true mastermind behind said killing spree.
[[/folder]]

[[folder:Film]]
* In ''TheDeparted'', Creator/MattDamon plays a Boston cop and mole for [[JackNicholson 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 ''[[TheInfernalAffairsTrilogy Infernal Affairs]]''.
* In ''{{Saw}}'' IV, Detective Mark Hoffman is revealed to be SerialKiller Jigsaw's second protégé.
* In ''[[OceansEleven 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 ''AceVentura'', 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 ''Film/WhoFramedRogerRabbit''. He's the one who committed the murder. [[spoiler:What's more, he also kills R.K. Maroon before he spills the beans. And was the one behind the company buying Maroon Studios and the Red Car. ''And'' was the one who killed Eddie's brother all those years ago. Moreover, he did all this so that he could destroy Toontown and build a resort area next to the soon-to-be completed freeway. (And, according to one of the first drafts of the script, he was the one who shot Disney/{{Bambi}}'s mother!) That's one seriously disturbed toon.]]
* In ''TheSting'' 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 ''SinCity'' is working for the bad guys. The only difference is that there is no reason to keep it a secret.
* In ''NoWayOut'', the three main characters involved in the investigation of a Pentagon-related murder that is blamed on a [[RedHerringMole 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 [[spoiler:is an actual Soviet mole]].
[[/folder]]

[[folder:Literature]]
* This happens in several Creator/AgathaChristie novels. A few examples would be:
** In ''Hercule Poirot's Christmas'' the murderer turns out to be [[spoiler:Superintendent Sugden]].
** In ''The Murder of Roger Ackroyd'', [[spoiler:the civilian who assists Poirot in searching for the killer and narrates the novel is himself the killer]].
** In ''Curtain'' the murderer is [[spoiler:Poirot himself. Well, he's *one* of the murderers, anyway--still not the main one.]]
* In Gaston Leroux's novel ''The Mystery of the Yellow Room'', the murderer turns out to be [[spoiler: Frederic Larsan, the Lestrade-like police detective who competes with the AmateurSleuth for solving the crime]].
* [[spoiler:Ivan Frantsevich Brilling]] in ''[[Literature/ErastFandorin The Winter Queen]]''. He wasn't directly involved in the crime itself, but [[spoiler: it was done by members of the same organization]].
* Michael Slade's RCMP novels are fond of this trope, using it with a Mountie in ''Headhunter'' and a forensics analyst in ''Primal Scream''.
* ''RomaSubRosa'' 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 [[spoiler:the first police officer on the scene.]]
* The murderer in Creator/IsaacAsimov's ''Literature/TheCavesOfSteel'' is [[spoiler:in charge of the investigation, and specifically picked his old friend, the main character, to handle it]].
* In the ''Literature/LordDarcy'' novel ''Too Many Magicians'', the true identity of the murderer/Polish spy known as 'Goodman Fitzjean' is [[spoiler:Commander Ashley, the Naval Counterintelligence officer assigned to track Fitzjean down]].
* Literature/TimeScout: Sid Kaedermann insinuates himself into the rescue mission for his own victims.
* This happened when a police inspector was covering up evidence at the scene of crimes his organization had committed until he was stopped by the Shadow.
* Fred Vargas' novels have two examples so far.
** In ''This Night's Foul Work'', [[spoiler: Ariane Lagarde, a highly-respected forensics expert]] deliberately misleads the whole investigation team by setting up a false but very convenient culprit. Adamsberg and Danglard do think that someone connected to the crimes is in their team... [[spoiler: but they spend most of the book suspecting Lieutenant Veyrenc.]]
** In ''The Ghost Riders of Ordebec'', the Ordebec murderer is none other than [[spoiler: Louis-Nicolas Emeri, the ''gendarmerie'' officer initially in charge of the investigation.]]
* In ''Literature/ArseneLupin in Prison'', [[spoiler:the Inspector Ganimard from the first half of the story, hired by Baron Cahorn to stop Lupin's newest scheme, is an impostor employed by Lupin, as opposed to the real Ganimard who visits Lupin in jail in the second half of the story.]]
* In ''[[Literature/VorkosiganSaga Memory]]'' by Creator/LoisMcMasterBujold, the [=ImpSec=] head Simon Illyan is poisoned by Lucas Haroche, one of his direct subordinates and effectively his second-in-command. Haroche doesn't lead the investigation personally, but he does decide who is on it, its scope, and who can contact Illyan.
[[/folder]]

[[folder:LiveActionTV]]
* In the first-season ''Series/{{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 [[TheButcher Bay Harbor Butcher]] and Dexter spent evading them.
* In ''The Mrs. Bradley Mysteries'', the killer in the final episode turns out to be [[spoiler: Inspector Henry Christmas]].
* In season 3 of ''NipTuck'', serial killer The Carver turns out to be [[spoiler: Quentin Costa and Detective Kit [=McGraw=], who's investigating the case, is his sister and accomplice]].
* The third episode of ''PushingDaisies'' 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 ''Series/{{Columbo}}'' episode "A Trace of Murder," the killer is a crime scene investigator.
* In the Season 1 finale of ''{{Series/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 ''Series/{{Monk}}'', "Mr. Monk and the Captain's Marriage", where the killer turned out to be a cop who claims 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 ''Series/{{Highlander}}'', as he's in charge of the division of Watchers who are trying to find him.
* This happens in a ''Series/{{MADtv}}'' 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.
* ''MidsomerMurders'' 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).
** Sgt. Trevor Gibson in "Sleeper Under the Hill" turns out to be involved in the killings and does his best to throw Barnaby and Jones off the trail. He ultimately falls victim to his partner in crime.
* The detectives on the "Strike Team" on ''Series/TheShield'' were made to investigate the robbery of a money laundering operation which they were responsible for.
* [[PlayingWithTropes Played with]] in the 5th season of ''TheWire''. Two detectives fake a series of murders of homeless men using bodies recently deceased of natural causes, and end up investigating their own staged crime scenes. Instead of attempting to cover up their work, the aim is to bring publicity to the "killings" in order to restore police funding.
** Also, an unscrupulous reporter fakes having received a phone call from the imaginary killer in order to further his own career, much to the [[CowboyCop "mastermind's"]] surprise; who then decides to call the reporter ''for real'' as the killer to bring in even more publicity.
* In an episode of ''Series/SabrinaTheTeenageWitch'', the cast took part in a magical murder mystery party, with Sabrina acting as the detective. Much to her own surprise, she turned out to have committed the crime at the end of the episode.
* In one episode of ''Series/TheCloser'', a [[AssholeVictim man who killed two of his girlfriends]] in the late 90s, but was never convicted because the bodies weren't found, is murdered. The man who lead the first investigation, a Detective Olin who has since retired, is asked to come in and help them with the new murder, because of his insight in the original case and his close relationship with the families of the victims. In the end, it turns out Detective Olin is [[TheLastDance dying]] and, desperate to solve his ThatOneCase, killed the man after torturing him until he revealed where he buried the bodies.
* In the ''Series/{{Leverage}}'' universe, the actual, real-world never-solved mystery of [[http://en.wikipedia.org/wiki/D._B._Cooper D.B. Cooper]] was never solved because... basically right after landing, D.B. Cooper got himself into his own investigation, tampered with the evidence, and then spent the rest of his life as a completely legitimate FBI agent.
* Happens several times on ''Series/BabylonFive'', due partially to the fact that the eponymous station is where folks go (at least earlier in the show) when they get ReassignedToAntarctica. Many of the security guards work there simply because they had nowhere else to go, and more than a few are easily bribed. The most notable example, however, would be [[spoiler: Garibaldi's assistant Jack]], in the first season.
* In the ''{{Series/Thriller}}'' adaptation of RobertBloch's "Yours Truly, Jack the Ripper," the Ripper is actually Dr. John Carmody, the psychiatrist consulting for the police investigation of the latest string of murders.
* In ''{{Series/Kojak}}'''s second episode, "Web of Death," a police detective murders his wife's lover and gets himself assigned to investigate the case. Unluckily for him, his usual partner comes down with appendicitis and he gets paired up with Kojak, who quickly sniffs out the truth.
* In an episode of ''FoylesWar'', the killer of the [[NeverOneMurder second victim]] is the detective who's taken over the case Foyle was working on, Foyle himself having been unexpectedly suspended on a flimsy charge that comes down to a case of mistaken identity. It turns out that the other detective set him up for a chance to get at his own victim (ItsPersonal), who lives near where the investigation is taking place. Foyle's efforts to clear his own name and get back to work conveniently lead to a EurekaMoment about the other detective.
* Micheal in ''BurnNotice'' does this often when he gets hired by the bad buy to find out who is after him (more often than not being Michael himself). One notable one is he is hired to be a Spy Hunter and pretty much has a blast suitably suggesting it could be him to the mark.
* On ''Series/{{Justified}}'' US Marshal Raylan Givens tends to run into those types of moles. In season one Sheriff Hunter Mosley turns out to be working for a Miami drug cartel and is called in to investigate when his relative botches a hit on Raylan. In season 2 it is an OpenSecret that the Benetts are the biggest marijuana growers in the state and Sheriff Doyle Bennett regularly investigates and covers up crimes committed by his brothers. In season 4, the FBI agent in charge of investigating the Tonin crime family has been on their payroll for years. When Raylan goes looking for fugitive Drew Thompson who disappeared in Harlan County 30 years ago, he is helped by new sheriff Shelby Parlow who not only is reluctantly working for crime boss Boyd Crowder but also [[spoiler: is Drew Thompson]].
* In the [[spoiler:second]] season of ''Series/{{Forbrydelsen}}'', [[spoiler:Lund's new sidekick Strange is the killer]].
[[/folder]]

[[folder:Music]]
* In the {{Vocaloid}} song [[https://www.youtube.com/watch?v=znir_s4Q9BA "The Riddle Solver Who Can't Solve Riddles"]], the detective (played by Len) initially appears to be unmasking the girl (played by Rin) as the culprit of the murders. However, in the end, the detective reveals himself to be the actual killer.
[[/folder]]

[[folder:Tabletop Games]]
* The board game ''TabletopGame/{{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. "Prof. Plum: The killer was Prof. Plum. [...] Curse you, Prof. Plum!". Also, that apparently still counts as a win.
** Mr.Green:I won, I won! I may be going to jail, but I won!
[[/folder]]

[[folder:Theatre]]
* ''TheBat'' 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.
[[/folder]]

[[folder:Video Games]]
* [[spoiler: Adachi]] in ''VideoGame/{{Persona 4}}''
* [[spoiler: Luke Atmey]] in ''VisualNovel/AceAttorney'', not actually [[spoiler: the thief he was looking for, but he was the mastermind behind his heists.]]
** Also [[spoiler:Tyrell Badd, one leg of the Yatagarasu]] in ''Investigations'', who [[spoiler: made sure to be the detective assigned to the Yatagarasu case specifically to destroy any evidence his partners left behind.]]
** If we're adding in lawyers (who practically function as detectives in the games), we have [[spoiler:smuggling ring moles Calisto Yew and Jacques Portsman, the former was also one of the Yatagarasu]].
** Not to mention [[spoiler:Manfred von Karma, Damon Gant, Daryan Crescend (according to WordOfGod), Byrne Faraday, Bansai Ichiyanagi and Bobby Fulbright]]. And special credit for [[spoiler:Furio Tigre and Kristoph Gavin]], who manage to be moles while being detective-lawyers for the ''defense''.
* [[spoiler:Scott Shelby (the Origami Killer)]] from ''HeavyRain'', who is [[spoiler:pretending to be a private eye hired by the victims' families so he can get access to and dispose of any evidence that implicates him.]]
[[/folder]]

[[folder:Web Original]]
* In ''WebVideo/DoomHouse'', Officer Cop is initially introduced as the dispatched police officer responding to Reginald P. Linux's 911 call, but he turns out to be the one responsible for the horror Linux is experiencing inside the doom house.
* Played for laughs in the SMBCTheater short [[https://www.youtube.com/watch?v=bMxds0dBILc Homicide Detective]]:
-->"Why, I've been the killer all along [...] But how?"
-->"Remember when you stabbed this guy... five minutes ago?"
[[/folder]]

[[folder:Western Animation]]
* No connection whatsoever to HannaBarbera cartoon star [[SecretSquirrel Morocco Mole,]] who is an assistant detective who happens to ''be'' a mole.
* ''WesternAnimation/DanVs'': In the episode "Dan Vs. Elise's Parents", Dan tries to get Elise's father arrested by manufacturing evidence that he's the head of the mafia. This evidence is enough to convince the police to open their own investigation. The detective they send turns out to be a mole, working for the ''real'' mafia.
[[/folder]]

[[folder: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
* FBI agent John Connelly was involved in helping mobster James J. "Whitey" Bulger get away with his crimes for as long as he did. Colin Sullivan in ''Film/TheDeparted'' was loosely based on him, while Frank Costello from the same movie is based on Bulger. Connelly is currently in a Massachusetts prison for a 40 year sentence after serving a 10 year sentence in Federal prison. It was partially thanks to him that Bulger was able to escape as a fugitive for as long as he did.
* Kim Philby was head of the counter-espionage section MI6 for two years, while all the time he was a spy for the Soviet Union, and thus charged with stopping himself before he defected.
** Philby and his colleagues blew the cover of several British intelligence officers, one of whom would go on to write spy novels under the name JohnLeCarre. ''TinkerTailorSoldierSpy'' is a fictionalized version of the whole affair.
* Dennis Rader, the [[SerialKiller 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.
[[/folder]]

----