24: This show has probably the most famous example of this. Over the course of eight seasons, there have been fifteen named and confirmed moles, not counting the hundreds of unnamed ones in Day 7. This figure also doesn't include double and triple moles. Amazingly, even by the eighth season, the characters are still astounded when a mole within CTU is uncovered. This has prompted many fans to suggest that Jack Bauer needs to have a long talk with CTU's director of Human Resources. Not just CTU itself, every agency in the series is plagued by numerous moles.
The Adventure Game: After appearing as a contestant in the last episode of the first series, former Blue Peter presenter Lesley Judd appeared as The Mole in the second series, ostensibly needing to be rescued by the three contestants but actually working to hinder them. The contestants would be told in advance that "one of [them]" was a mole, and around two-thirds of the way through each episode, they and Judd would be gathered together and asked to collectively identify the mole; if they guessed correctly, Judd would confess and allow them to continue, but if they guessed incorrectly, the falsely accused mole would be eliminated from the team (though this came with the blessing of exempting them from the episode's final game, the Vortex), Judd would unmask herself, and the remaining two contestants would have to continue on their own. Only one of the five teams from Series 2 (comprising mathematician and Rubik's Cube expert David Singmaster, Nationwide presenter Sue Cook, and marketing executive Philip Sheppard) correctly identified Judd as the mole.
Multiple moles appear in "Turn, Turn, Turn": HYDRA has so thoroughly infiltrated S.H.I.E.L.D. that they are able to stage a coup, capturing multiple S.H.I.E.L.D. facilities. In addition, Agent Garrett turns out to be the Clairvoyant and a HYDRA operative, and Agent Ward turns out to be his right-hand man. Later in Season 2 Episode 3 "Making Friends and Influencing People" it is revealed Agent Simmons is undercover in HYDRA, leaking their projects to Coulson and in Episode 5 "A Hen In The Wolf House" Bobbi Morse A.K.A Mockingbird, Head of Security for HYDRA is also a mole...put in charge of finding moles.
At the end of the first season, Garibaldi uncovers a plot to assassinate the president of the Earth Alliance. Before he can deliver a warning, he is shot in the back by his aide Jack.
In "Divided Loyalties", Lyta Alexander delivers a warning that someone on the station has a deep-cover personality implanted by Psi Corps. It turns out to be Talia Winters.
A minor example in one episode of Barney Miller has the squad looking a "field agent" who is working for Internal Affairs. Due to the litany of excessively trivial offenses they're cited with, they quickly figure out that it's Levitt.
The Barrier: A nurse from the registry office tricks Álex into coming in her appartment by pretending to be part of La Résistance. She turns to be working for the Police State and to have lured Álex so she could use radical means to keep him from joining the real resistance.
Battlestar Galactica (2003): Played with. From the beginning of the first season the audience is aware that Boomer is a Cylon, although the crew of the ship, and Boomer herself, are not. The season arc features her struggling with self-doubt over whether or not she's human, attempting suicide, and ultimately learning that she is in fact a Cylon. In the season finale, she seemingly sides against her kind and sets off a nuke destroying a Base Star full of other copies of her, and at that moment the Wham hits; as Commander Adama is meeting her in CIC and praising her for a job well done, she draws her sidearm and shoots him twice, point blank, in the chest. The reveal of several other characters in the season three finale includes two significant moles, as well as two lower tier individuals. Not really moles though — their presence in the fleet turns out to be more like a punishment — or a joke.
Blackadder Goes Forth: One episode has Blackadder look for a mole within the military hospital. He takes the opportunity to torture...I mean interrogate Darling for kicks, and gets cozy with the hospital nurse, while a man with an obvious German accent is a patient in the hospital. Come to find out in the conclusion, though, the nurse was the actual mole, and the 'German spy' was, to Darling's embarrassment, a British mole who picked up an accent during his time in Germany. Then the Twist Ending reveals that George was inadvertently the mole, writing letters to his German uncle.
Charité at War: Fritz Kolbe is suspected of being a spy of the Gestapo (Nazi secret police). He's actually spying on the Nazis for the Americans. Nurse Christel becomes a mole for Nazi Professor de Crinis, and gladly denounces dissidents and homosexuals to him.
The Closer: In the final season, a leak in Chief Brenda Leigh Johnson's department traces back to Lieutenant Gabriel's girlfriend Ann. Goldman hired her to cozy up to Gabriel for inside information about the LAPD and Brenda's cases especially. Gabriel is legally cleared of wrongdoing, since everything he shared with Ann was said in confidence. He's still heavily scorned by members of the team for his accidental role in the leak.
"The Web of Fear" concerns the fact that one character in the group is working for the Great Intelligence. Oddly for anyone who knows anything about Doctor Who, the character clearly intended to be the primary suspect for most of the story is (then-)Colonel Lethbridge-Stewart. (The novelisation alters this by clearing him of suspicion early on.) The viewer's primary suspect is probably Chorley. The actual suspect turns out to be Arnold, a Mauve Shirt who got killed in an earlier episode and is still moving around as a possessed corpse.
The character of Vislor Turlough is initially introduced as a mole character who orchestrates his way into becoming one of the Fifth Doctor's companions under orders from the Black Guardian to kill him, but eventually does a HeelFace Turn and defies the Guardian and goes on to become a loyal companion for the rest of his time on the show.
In a heroic example, the alternate-universe Pete Tyler is revealed to be a spy inside Cybus Industries, anonymously sending information to the Preachers.
In "The Runaway Bride", Lance the fiancé of the eponymous bride is revealed to be working for the sinister Empress of the Racnoss.
In "Attack of the Cybermen", one of the gang is actually a police officer. And it turns out that Lytton was using the Cybermen to get to his real employers and help them against the Cybermen.
"The Long Game": It turns out that Suki MacRae Cantrell, one of the reporters that the Doctor, Rose and Adam meet on Floor 139, is actually Eva St. Julien, last surviving member of the Freedom Fifteen, who infiltrated Satellite 5 to try and bring an end to the Epiphanic Prison it was keeping humanity in.
"Utopia": A Futurekind woman has infiltrated the bunker amongst the throngs of refugees in order to sabotage the base. The fact that she lacks the tattoos and piercings sported by the others certainly helps.
In "Last of the Time Lords", a scientist Martha gets help from turns her over to the Master. Exploited, however, as Martha's actually counting on her doing so as part of her plan.
"Planet of the Ood": Dr. Ryder eventually reveals himself as a member of Friends of the Ood who spent ten years infiltrating Ood Operations to try and free the enslaved species.
In "Journey's End", it turns out Dalek Caan is one. When he last escaped the Doctor with his time jump, he accidentally saw all of time and realized just how wrong and evil his own kind are. So, he set it upon himself to destroy them, leading the Daleks to a point where the Doctor could destroy them for good.
Dollhouse: The early episodes set up that there's a spy somewhere in the House, eventually revealing it to be head of security Dominic. Notable in how the character was practically the only one fans hadn't suggested The Mole to be...because it was such an obvious choice, assumed that it ruled them out. Oh, Joss Whedon, you insane genius. In the final episodes it is revealed that in fact Boyd, a trusted figure in Adelle's house, was the one in charge of Rossum Corporation.
In Dominion, the humans now face a serious threat of this from the Powers, who don't need to possess human hosts, and can thereby get past the angelic detection equipment. And then there's the Black Acolytes, the cult that worships Gabriel, and are far reached enough that one of them is William Whele, leader of the Church of the Savior and son of the second most powerful person in Vega.
In Elementary, a powerful business man with few moral scruples is hardly a good man, but after Moriarty, Holmes' nemesis, is in jail and Moriarty's successor feared this man could take over and and so tried to assassinate the rival, the mole, Morland Holmes, father of Sherlock Holmes, does take over Moriarty's organization for the express purpose of destroying it from the inside.
Firefly: Yolanda/Saffron/Bridget made a living out of being The Mole. She was introduced as an innocent and submissive young woman. She claimed she's a reward as wife for their captain because her people couldn't pay them in a standard way while in fact she's a trained companion and criminal mastermind who tried to kill the crew in order to sell their ship. She also ratted out her husband who loved her deeply and thought she was kidnapped from him.
Flash Forward executes a perfect Reverse Mole when Janis is first revealed to be a mole, then revealed to be working for the CIA. Technically, she is still a Mole as she is supposed to be working for the FBI. This is also an example of Lampshade Hanging, as the character's name recalls the guardian Roman god with two faces, Janis (also known as Janus).
Flashpoint has a couple, though not in the SRU itself.
In "Clean Hands", a serial killer is transported following extradition. Among his victims were the daughter of airport employee Walter Volcek and the sister of customs agent Delia Semple; Semple and Volcek team up to take him out. Volcek is caught and stopped, but if it weren't for an offhand comment Sam happened to drop and Parker happened to pick up on, the SRU wouldn't have caught on to Semple until it was too late.
In "No Promises", Spike's mentor becomes this out of desperation (he needs money to save his drug-addicted daughter). When he starts backing down, his daughter is kidnapped and held hostage, forcing him to go along with their plans.
"Just a Man": Ed Lane suspects that Anton Burrows is this, pretending to be helping while actually misleading him. He turns out to be wrong, however; Burrows risks his own life to protect the very people who had prevented him from getting parole the same day.
Two of the apparent hostages in "Grounded" are actually in on the plot. The two main hijackers do reveal that they have accomplices posing as hostage passengers, but they don't tell the passengers who they are. It's not until about halfway through the episode that the third conspirator reveals herself, and it's several minutes more before she orders the final member of the team to reveal himself because they need the extra hands.
Locke poses as a Night's Watch recruit to find Bran and Rickon, going so far as to actually take the vows. He's killed before we find out how he was planning to get out of that.
Jorah was originally one to Varys. He later becomes the mask and serves Daenerys loyally.
Varys serves in the Small Council at the Baratheon dynasty's pleasure, but he's secretly in league with a group of people who "saw Robert Baratheon for the disaster he was" and plans for a Targaryen restoration.
Glee: Quinn, Santana and Brittany, the three Cheerios who join Glee Club, are secretly spying for Cheerios coach Sue Sylvester, who is trying to bring down the club. As the series goes on, though, and Quinn's popularity and membership in the Cheerios are destroyed by her pregnancy, this gradually changes.
Greek: Jen K is a mole for the school newspaper, and puts a dent in the entire Greek system with her article.
The Handmaid's Tale: Nick is an Eye of God (i.e. part of Gilead's intelligence service), but also a part of the resistance. Joseph Lawrence is a Commander, though he too gets revealed to be working with them. The first sign he's a good guy is his refusal to rape Emily as part of the Ceremony. However, he still acts harshly to June (especially while his fellow Commanders are there), though it may be an example of Good Is Not Nice or so they won't get suspicious.
Sailor Wolfe seemed to be an ordinary seaman who joined HMS Hotspur by mere chance because he just wanted to serve in the Royal British Navy. He's an Irish rebel who collaborates with Napoleon Bonaparte, trying to liberate Ireland from the Brits by invasion and war.
Captain Hammond was mentioned by name in several episodes and appeared in all three instalments, but he never looked to be a significant character, other than he was a rather famous figure in the Navy and a Hanging Judge during a court-martial in "Retribution". In "Loaylty", it's revealed that he was secretly working for Irish rebels his whole life.
Vera, in an interesting Evil vs. Evil version, where she was pretending to like and work for Victor, when she was really on Rufus' team. However, she may have wound up Becoming the Mask by the end of the season. That didn't stop Victor from kicking her out when he learned the truth.
Fabian's godfather Jasper fell into this trope, as he was being blackmailed by Vera herself, making him spy on his own godson and his friends. Fabian was heartbroken upon finding out, but knew Jasper was doing it to protect him from Rufus.
Jerome, who was also working for Rufus in the first season, was using Alfie to get information and artifacts from the Sibunas. Alfie eventually stood up to him, refusing to spy on his friends. Jerome later becomes a heroic mole and tries to get information from Rufus to give to Sibuna.
Early in the third season, Fabian and Patricia thought KT and Eddie were working for Victor and caused Nina's disappearance, similar to how Patricia thought the same of Nina earlier. The two of them were isolated from Sibuna for a little bit until they finally learned that their friends were trustworthy.
While not done in the direct sense, the same principle is used on Hustle frequently with a random character turning out to be part of the con.
In "War Cries", the boy, his sister who the Marine was dating, and their mom were all sleeper agents for the Shining Path, and weren't even related to each other.
In "Brig Break", Gunnery Sergeant Gentry.
In "Ares", Lieutenant Commander Gino Campisano is the senior weapons officer running the eponymous computerized weapons system onboard the destroyer: and suddenly, while off the North Korean coast, it starts to go crazy, operating without human input, and allowing no vessels other than ships to approach it. What no one knows is that Campisano is a North Korean mole, planted in the United States many years ago.
In "Brig Break", Petty Officer Quinn, who turns ou to be an agent from Naval Intelligence working undercover.
Happens in "Scimitar". One complication though is that Harm and Austin do not know who the Reverse Mole with codename scimitar is, and they must find out without revealing themselves. Scimitar's identity is finally revealed when she arrives at Harm's room and [[spoiler: turns on the shower so they can talk in private.
Leo, one of the new guys at surveillance Ed hired in season 2, is revealed to be working together with a group of card counters.
Adam, an employee remotely overseeing the card games in "Hit Me" is revealed to be sending electronic signals to a player.
Lost: Seconds after Flight 815 crashed, Ben dispatched minions to infiltrate the survivors. They later turn out to be Ethan in the main group and Goodwin in the Tailies. In season two, Michael is forced to act as a mole. In season three, an elaborate ruse is utilized to let Juliet infiltrate the survivors, but she turns pretty quickly.
MacGyver (1985): In "The Enemy Within", Mac must discover the identity of a mole within the DXS who has caused the death of four agents.
Merlin: Morgana was The Mole for most of season 3, and now Agravaine has taken over the role, working for Morgana
The Mole: This TV-program is the Reality Show version of this trope. The contestants engage in various challenges, and the better they do, the more money goes in the winning pot; at the end, the winner gets the pot, and the Mole gets the rest of the prize fund as a measure of how well they screwed things up. The contestants are also periodically quizzed about the Mole's identity and actions, with the poorest scorer eliminated. Played with: as a metagame strategy, non-Mole contestants also screw up on purpose, to fool others into thinking they're the Mole and thus do poorly on the quizzes. Sure, it decreases the winner's take, but it increases your chance of being the winner. (Better yet if you can just look like you're trying to screw up.)
NCIS: New Orleans: Season Four's "The Asset" had FBI agent Sarah Barns, who was revealed to be a Double Agent aligned with the Russians. Her heel turn came when she shot Eva Azarova (who survived due to wearing a vest) and attempted to kill a former Russian operative who had information on other operatives, including Barns.
Neverwhere: Used to good effect, where the Big Bad's Dragons inform the heroes that there is a traitor among them. The viewers are led to believe that it will turn out to be the Marquis de Carabas, and it is made clear that the heroes believe this as well, but it's really the bodyguard, Hunter.
The New Avengers: In "To Catch a Rat", a former agent recovers his memory after having amnesia for 17 years. He remembers he was hunting a mole known as 'the White Rat'. Realising the the Rat is still in the department, he resumes his hunt.
Nikita: Alex is set up to be the mole from the very start, and we see it all from her point of view. She remains the mole for the entirety of season 1. There is even a Was It All a Lie? moment coming from a more minor character, Thom, directed at the main character of Alex mid-way through the season.
In the season 3 finale, FBI agent Colby Granger was revealed to be a spy for the Chinese. But in the premiere of season 4, it was shown that he was a double agent the whole time.
Played straight with Dwayne Carter. Though Colby's the only one who knows him well enough to be shocked. He actually wasn't, he knew exactly what Carter was up to, but he played it well enough that Don put it down to an error in judgment.
The first season has Petruchio position several of his crusaders in Aleppo, donning aliases and sending pigeons back to his stronghold to secure information that they believe could give them an advantage over the Kayis and the Ayyubids.
Karabek and Efrasiyab serve as this for Noyan in season 2, though Ertugrul is aware of this since he saw them in the Mongol camp while he was held captive.
Titan in season 4 serves as one to Ares on one occasion, visiting the Kayi tribe under an alias and gaining the trust of the locals so they wont suspect him of trying to abduct Ertugrul's son Gunduz in order to lead Ertugrul into a trap.
Dragos and his lackeys are oh-so befitting of this trope in the fifth season, in which they take on seemingly-normal occupations throughout the streets of Sogut while masking an elite military coalition bent on placing Asia Minor under their influence.
Hamza Alp and Abdurrahman Alp both pretend to side with Baiju Noyan in order to gain vital information for the Kayis and Dodurgas. Even though Abdurrahman manages to pull off the ploy as intended, Hamza sadly ends up succumbing to greed and actually betrays Ertugrul in the process.
Nate Walker/Jason Neville is revealed to be a militia spy as soon as they get to Miles in the pilot episode. In episode 5, it is revealed that he is Tom Neville's son.
In episode 8, Mia Clayton, Nora's sister, is not only this, but also a Bounty Hunter who captured Nora's fellow rebels and was working for that Sergeant Will Strausser. Nora was so disgusted that she abandoned her, even though they had made a promise to look out for each other.
In episode 9, Joseph Wheatley, ostensibly of the rebels (possibly going by "Captain Burke"). In fact, he's been a militia spy for some time.
Episode 17 had Miles quickly realizing that a mole has tipped off Monroe to the Resistance's whereabouts. Episode 18 has Miles trying to find out the mole's identity, and Jason Neville is the prime suspect. However, it turns out to actually have been Jim Hudson.
Robin Hood: A series 2 subplot in the 2006 BBC adaption features Allan a Dale working as an informant for Guy of Gisborne, resulting in his exile from Robin's gang and the end of all his friendships when his treachery is unmasked. He is technically a good guy, so he also occasionally acts as their mole though this is much more rare until the season finale, in which he deliberately contradicts Guy's orders in a semi-suicidal bid to save the gang's lives and rejoins the band.
Uses this with Michael Eddington. Originally a by-the-book secondary character who is more loyal to Starfleet than the rest of the cast, Eddington is eventually revealed to be a Mole for the rebellious Maquis.
There's the time Doctor Bashir was revealed to have been a Changeling impostor for the last several episodes.
The Romulan Tal'Shiar is shockingly prone to moles at its highest ranks. In "The Dies is Cast", Colonel Lovok reveals himself as a Changeling. And in "Inter Arma Enim Silent Leges", General Koval (the Chairman of the Tal'Shiar) is a double agent for the Federation.
Malcolm Reed works for an early incarnation of Section 31, while reporter Gannet turns out to be working for Starfleet Intelligence and Ensign Masaro for radical Earth group Terra Prime. Reed, at least, wasn't all too happy about betraying his commanding officer, and when push came to shove, he stood by Archer. He is one of the few characters of whom this can be said.
The angel Uriel turned out in their last episode to have been joined Lucifer's cause, trying to recruit fellow angels to join him and killing those who refused. Note that the mole's successful conversions are never brought up again, making it possible that Lucifer loyalists may still be present in the ranks of the Heavenly Host in show canon.
The presentation of angels as a whole, not just Uriel, may qualify, at least in Season 4. They are initially portrayed as allies to the heroes whose differing view of what constitutes an "acceptable" sacrifice causes them to clash somewhat with the latter group. While they all turn out to still be reasonably sympathetic in their own ways, the season finale reveals that the higher-ups in Heaven want Lucifer freed in order to kill him and create "Paradise," which is suggested by an actor for one of the characters to be a Dystopia of brainwashed human slaves, as opposed to Lucifer's vision of a human-free universe, and in subsequent seasons, even angels not involved in this ploy are often enemies to be killed.
Also revealed in their last episode, the demon Ruby was another mole for Lucifer (not that they knew they were on the same side as the above mole or would have gotten along even if they had, due to Fantastic Racism). More accurately, Ruby was secretly working for demon queen Lilith, whom Ruby sent Sam after to kill on Lilith's own orders, as the other demon's death was the last seal needed to be broken to release their master, Lucifer, from his prison. While the character's true loyalties and agenda was long suspect by fans and by other characters, making this twist somewhat of an Untwist, the way it played out was a satisfying resolution.
Abaddon played this role 50 years before the series proper; she possessed and impersonated an inductee into an ancient mystical order in order to infiltrate and spy on them, planning to destroy them completely after learning all their secrets. She succeeded on all counts.
"Folsom Prison Blues" has Dean and Sam get themselves arrested so they could investigate a haunting at a prison. One of the prison guards asked for their help and helped them escape once they finished the job.
In "The Spear", Garth makes a show of betraying Sam and Dean to Apocalypse World Michael in order to find out more about what he's planning with this world's vampires and werewolves. (This comes a few years after his conversion to werewolf.)
Taken: In "God's Equation", Dr. Harriet Penzler, who runs Lisa's Alien Abduction therapy group, is an agent of the UFO project. She keeps them updated on Lisa's activities and Allie's progress and informs them that Charlie has arrived on the scene. In "Dropping the Dishes", Dr. Penzler reveals the truth to Charlie and Lisa, telling them that the project led her to believe that what was doing was in their interest as well as Allie's.
Tehran: Yael turns out to be a double agent in service to the Iranians.
The Twilight Zone (1985): In "Room 2426", Dr. Martin Decker's cellmate Joseph is an agent of the State. He was instructed by Dr. Ostroff to convince Martin that teletransportation was real so that he could learn the location of Martin's bacteria research.
V (1983) had a fair amount of The Fifth Column, some of them high-ranking. Seems a lot of the Visitors weren't very happy with their orders.
During Season 2, the investigation into the Greek's syndicate is sabotaged at several points along the way by leaks from an FBI agent on his payroll.
Agent Fitzhugh's apology to Daniels suggests that the leaking agent isn't corrupt, but another product of the FBI emphasizing counter terrorism over everything else. The Greek is protected from investigation by the FBI in exchange for counter terrorism intel.
Has this trope all over the place, Played With and from various points of view.
At the beginning, Mulder doesn't trust Scully. She's officially assigned to work with him, and everyone knows it's really to debunk his work. He thinks she might be connected with the conspirators, but she's honest and only submits her reports to their supervisors. Her loyalty soon belongs to Mulder completely, and he knows it.
It pops up from time to time that Mulder and Scully's direct supervisor, AD Walter Skinner, might be dirty and collaborate with the shady conspirators. Nope, he's allright and one of Mulder and Scully's strongest allies.
From the conspirators' point of view, Mulder's Mysterious Informants are The Moles who rat them out, trying to ruin their cause.
Deep Throat was involved with them and claimed that he wanted to atone for his deeds, therefore he helped Mulder in his quest for exposing the truth.
Mr. X was very pragmatic. He never made it a secret that he does what's best for him. He worked for the Cancer Man, and was informing Mulder behind his back.
Marita Covarrubias played it on both side. She was helping Muldler, and telling on him to the conspirators
Scully's replacement for a brief amount of time in season 2, Alex Krycek. He was an FBI agent assigned to work with Mulder when The X-Files division as shut down and Scully was sent back to teach at the FBI Academy. Mulder never fully trusted him, but it was a bit of a surprise when he was revealed to be telling on Mulder to the arc villain, the Cigarette-Smoking Man.
In The Movie (The X-Files: Fight the Future), Well-Manicured Man is revealed to be one. The conspiracy group are in fact Well-intentioned Extremists, and he gives Mulder vital information, as well as a vaccine to save Scully.
Agenta Fowley and Spender, a pair of Agents put on the X-Files cases in season 6. Spender was more unassuming, never caring and happy to be destroying the files and informing the conspirators. But his partner Diana Fowley presented herself as Mulder's ex-girlfriend who still likes him and who are Birds of a Feather, like minds that should support each other and similar B.S. Mulder, to his credit, said that Scully's scientific approach had saved him and kept him honest. She collaborates with the Cancer Man and has Mulder subjected to horrific disease and treatment/experiment. However, she ultimately helps Scully to save him.