Reality TV does this often. If an episode is focusing on a contestant, chances are they are auf'd that episode. This is particularly true if their confessionals emphasize 1) How much winning the competition would mean to them; 2) How much they have come to appreciate their teammate/showmance partner; 3) How much they have learned / grown / matured because of their participation; 4) How wonderful the experience has been or how many new friends they've made; and 5) How much better / stronger / more skillful / better-liked / more in control of the game they are than one or more of their fellow competitors.
America's Next Top Model is an egregious offender. Whenever a girl shows up who isn't one of the handful of prominently featured girls in each cycle, she's either getting called first that week or being sent home. Expect her to be suddenly struggling with the judges' critiques, even though she's never been shown doing so before that point.
Survivor has a bad habit of doing this to its more under-the-radar players, particularly in later seasons. Once a contestant is revealed to the audience to be a homosexual in the same episode, he is voted out. One of the most famous examples would be the episode of Tocantins where Coach is voted out, after being sent to Exile Island, finding a "Dragon Slayer Cane", and (presumably) faking a back injury when losing the immunity challenge to JT.
The Amazing Race: This has become a way for fans to determine who will be eliminated at the end of the episode. In Season 15, when the other eight teams were ignored in favor of devoting an episode to Zev & Justin. Zev & Justin had more airtime, both on the course and in interviews, than the other eight teams combined. Considering how quickly the season went downhill after they were gone, this was probably justified.
Angel: Doyle and Cordelia. Fred's death also applies to a degree, although Fred was foreshadowed as a very real possibility throughout the episode, unlike the former two.
Band of Brothers: The third episode, largely focusing on an otherwise unknown character named Pvt. Blithe, concludes with him being shot in the neck and effectively dying (he leaves permanently and is said to have died from this wound years later). Unfortunately for this miniseries that prides itself on Truth in Television, Blithe didn't die from this wound, and continued serving in the military for most of the rest of his life until he died in 1967.
Battlestar Galactica (Classic): Did something like this in the episode "Lost Planet of the Gods". While Serina had been introduced already in the three-part pilot, her character got more fleshed out in the two-parter, she's then shot in the back by a Cylon in the last few minutes of part two.
Battlestar Galactica (Reimagined): "The Passage", with Kat, who had at least made a few appearances prior; "Razor", with Kendra Shaw, who within the span of a double-length episode is introduced, made one of the most important figures in the fleet, and killed off, never to be mentioned again; and "Sacrifice" with Billy Kekeiya, who had been an important secondary character since the beginning. Lastly, Gaeta and Zarek start a mutiny, during which Gaeta, who is normally a significant background character, took the spotlight. He was executed at the end.
Galactica has had a few others as well. Cally got an episode devoted to her just to wind up getting airlocked at the end. Dee was a prominent supporting character in the first three seasons, but was mostly a background character in the fourth season. She got a lot more attention in the Season 4.5 "premiere" only to off herself halfway through. There was also Simon, arguably the least developed of the Cylons throughout the series. "The Plan" puts a Simon copy in a starring role and makes him a sympathetic figure with a family. He kills himself with no chance of resurrection to avoid having to kill his family.
"Resolution" has a record of scenes featuring Manny Horvitz (four), three of which with him as the main character. In the first, he demands his own distillery from Nucky in exchange for killing someone for him, in the second he has a very cute interaction with his previously mentioned, but unseen wife, and in the third he is getting his brains blown out by Richard Harrow.
Billie Kent receives hers in "The Pony".
Averted in "Two Imposters", where Bumbling Sidekick Eddie is shot. He gets more screentime than usual and we get a glimpse of his backstory, but he is successfully operated on by the Samuel, med student and fiancÚ of Chalky White's daughter.
Burn Notice: Victor died almost as soon as we found out what his deal was. Later, in season 6, we start seeing a lot more of the usually absent Nathan just before someone puts a bullet into him.
Degrassi High: Claude plays this trope completely straight; he had appeared in a couple episodes in the first season (though he did have a significant amount of screen time in them) before committing suicide near the end of Season 2.
Desperate Housewives: The episode where Martha Huber dies begins with saying how much she wanted her life to be exciting and to be famous, and at the end, she was famous for her horrific murder.
"Father's Day". Granted, that character's death was a Foregone Conclusion and we are explicitly told this at the start of the episode.
FlashForward (2009): Al Gough receives this as his send-off episode. In fact, it is the first time that more than a few moments are devoted to his flash-forward and the mental turmoil he is experiencing, although it is hinted at every so often in the previous episodes.
Fringe: Did this to the Alternate Lincoln after giving us a much wanted episode with the two Lincoln's trying to figure out how they ended up so different from each other. The obvious guess would probably be Altlivia's influence in his life.
Harper's Island: Did this quite a lot. Particularly with Booth, Kelly, Richard, Maggie, and Beth. They had so many characters that they didn't have time to properly let us get to know them first.
House: The season 4 two-part finale starts features House knowing someone is going to die, but having been hit with a dose of Laser-Guided Amnesia. It turns out to be holy shit Amber. So that's what the sudden focus on her character in the previous few episodes had been leading up to...
How I Met Your Mother: Marshall's father who had rarely been seen in previous seasons, gets a bigger role in season 6 (when Lily and Marshall are trying for a baby) and halfway through the season dies from heart attack.
Kaizoku Sentai Gokaiger: When Waruzu Giru started getting character development beyond being the "emperor's idiot son", it was clear he didn't have long to live.
The Dragon Damaras as well, getting offed at the end of the two-parter when he finally steps into the battlefield.
Law & Order: Special Victims Unit: While Alex Cabot occasionally had episodes in which her legal case was bigger than the investigation, the absolute crowner was "Loss", at the end of which she dies. (No, not really. She goes into Witness Protection.) And as one of Alex's main roles on the show was to have UST with Olivia Benson, this episode was also a crowner of Les Yay.
LOST: Uses this trope a lot, often killing a character (or mortally wounding them) during their spotlight Flashback episode. Shannon, Ana-Lucia, Eko, and Faraday have all been killed in their flashback episodes. First and only flashback episode in Shannon's case.
Charlie subverts this trope just a little: he's told that he will die for real this time, spends the episode reviewing his favorite memories, does the thing that will kill him... and doesn't die. He dies in the next episode, when the limelight is on another character.
Nikki and Paulo are only ever shown a few times before their flashback episode in which they die, although the flashbacks indicate that they were around but didn't interact with the main cast. Most other characters who die in the limelight have at least some presence before they enter the limelight.
Another variant is Jacob, who is mentioned dozens of times before being shown onscreen in his first centric episode (though he isn't having the flashbacks, he appears in all but one of them). Then he gets offed at the end of the episode.
Arguably, the death of Daniel Faraday echoes this trope as well. Though he was a member of the main cast, his backstory was lacking until his centric episode "The Variable", in which his backstory was filled in and then he was killed.
One episode had the minor character of a medical examiner take an active part in an investigation which is something the character never did before. He intentionally put himself into the limelight because he needs Jayne to help him. He is dying of cancer and wants to kill himself but needs a law enforcement officer to witness the suicide so there is no need for an autopsy.
The series also has a tendency to give a character their limelight episode right before the episode where they die or is effectively written out. Bosco and Jane bond in 2x07, right before Bosco is shot dead in 2x08. Hightower partakes in an investigation in 3x15, before being framed as a Red John accomplice in 3x16. Finally Wainwright stands up to Jane in 4x23 before he's murdered by proxy in 4x24.
Merlin: In series 3, Guinevere's brother Elyan is introduced and knighted. The writers went on to do absolutely nothing with his character until mid-series 5, in an episode which explored his relationship to his sister, made him the key figure in a rescue mission, and gave him more lines than in any previous episodes. Any Genre Savvy viewer could see the giant bullseye on his head from the very first scene. Elyan did get a Day in the Limelight episode in season 4 (that revolved around him being Brainwashed and Crazy and trying to murder Arthur) but he's still an excellent example of this trope.
Miami Vice: Detectives Switek and Zito had always been the back-ups/comic relief to the show's main characters, Crockett and Tubbs. So when a third season episode featured them as the main characters in a case, it unsurprisingly ended with Zito being murdered.
Maggie suddenly gets flashbacks in the same episode in which she dies at the end.
Seven episodes later, Danny suffers the same fate.
The Sopranos: Does this with Gene Pontecorvo, a soldier who spends a solid three seasons providing background filler for many a group scene before having the season six premiere episode ("Members Only") focus on him, his hopes and dreams, his family life... and his suicide.
Subverted with Hesh Rabkin. He's a recurring character since the pilot episode, but never has an episode properly center on him until "Chasing It", nearing the series finale. It focuses on Tony owning him money and reluctantly paying his points while close associates discuss Hesh's demise. Hesh himself fears for his life throughout the episode as tensions rise. In the end, it's his girlfriend who suddenly dies, and Tony swings by to pay his respects/debt in full, though remaining estranged from him for the rest of the series.
Star Trek: Deep Space Nine: Inverted in the episode "Who Mourns for Morn" in which Morn, a minor character who NEVER SPOKE is presumed dead by the station crew. However, he only turns out to have been hiding in fear of his life.
Star Trek: The Next Generation: In the episode "Lower Decks", Sito Jaxa, one of the cadets from "The First Duty" who was reprimanded for unauthorized flight activity, was shown to have stayed on the straight and narrow and become an ensign on the Enterprise. She's then sent on a dangerous mission by Captain Picard. She doesn't survive. There was a story planned for Deep Space Nine that would have involved her turning up alive in a Cardassian prisoner camp, but said story never made it to the air. As far as canon's concerned, she's dead.
Star Trek: Voyager: Lt. Joe Carey was a recurring character in the first ten or so episodes, but then he fell off the radar. Near the end, they brought him back for a spotlight episode just to provide Wangst when they killed him off.
Jimmy Novak, the guy whose body Castiel was borrowing. It's not clear at the end of his episode if Cas saved him soon enough to keep him in his body, or if he got sent on and Castiel just kept the shell. Given the sort of stuff Castiel has been through right from the start of season 5, death might be the better option for the poor guy. It seems that he was still in here, as evidenced by "My Bloody Valentine". Cas was exploded, AGAIN, in the finale, so who knows. In season 10's "Things We Left Behind" Castiel tells Jimmy's daughter Clare that Jimmy went on to Heaven when his body was broken down at the molecular level.
"Abandon All Hope" counts for Ellen and Jo Harvelle. They haven't been seen for quite a while and then they come back after their appearance in the beginning of season 5 only for Jo to be wounded by a hellhound, and her and Ellen volunteering to stay behind and blow up a store to help the Winchesters escape. There's also "Hammer of the Gods" for Gabriel/The Trickster who had a big reveal about him in "Changing Channels", but then was murdered by his brother while doing exactly what the aforementioned duo had done.
In Season 7, "At Death's Door", is all about a comatose Bobby (who was shot at the end of the previous episode), trapped in his own head and trying to evade the Reaper chasing him and trying to find a way to wake up, in order to give some vital information to Sam and Dean about the Leviathans, all while running through his memories (telling us more about him than we'd learned in the past). At the end, he's given the choice of either moving on with the Reaper or staying behind and becoming a ghost — either way, he's dead.
Torchwood: Ianto Jones gets a lot more development, backstory and screen time in part 1 of the Children of Earth serial than in most of the past two series. Come part 4...
The Walking Dead: Dale, T-Dog, Axel, Oscar... oh hell, it's gotten to a point where if an actor of a minor (or major) character shows up as a guest on Talking Dead (the talk show that analyzes each episode after it airs) they are usually expected to die in that episode.
Averted with Hershel Greene in Season Four. After mostly playing a supporting role since his introduction, he has an episode in which he gets extra screentime, says his goodbyes to his family, and locks himself in with the sick and dying members of the group in order to save those he can, exposing himself to the deadly virus, and holding his own against the increasing number of freshly turned walkers despite very little in the line of weapons. He not only survives, but doesn't even contract the virus. Unfortunately, Hershel's life isn't completely saved. He dies a few episodes later.
The West Wing: "18th and Potomac", the penultimate episode of season 2, deals primarily with the escalating crisis surrounding President Bartlet's failure to disclose of a life-threatening illness. Inserted into this intense episode is a charming and comic sub-plot about the President's long-serving executive secretary Delores Landingham, and her plans to buy a new car. (Most of the sub-plot revolves around various male characters offering patronising advice on how to handle the dealer). In the last few minutes of the episode, this sub-plot is revealed to be of major importance, and also reveals the meaning the episode's title, when it is reported that Mrs Landingham has been killed by a drunk driver at the eponymous intersection while driving back from the dealership in her new car.