A female character of significant rank or status who exists solely to lose said rank or status barely five minutes into the story... and long before she can get any decent characterization.
This is an unfortunate variation of the Quickly Demoted Leader, where the sole qualification for getting a demotion is possessing girly parts.
In some cases, the writers of a show with a male demographic want to acknowledge that females exist in this universe, even if the main characters are nearly all boys/men. As a sort of compromise, they often introduce a high-ranking female at the end of her career. The (male) protagonist meets her briefly, probably mentioning her former achievements as he does so, and then she politely vacates the spotlight so that the boys can get on with things, her pride and former glory intact. Depending on the cultural background of the work, her retirement may be less about age or ability and more about leaving to start a family. In these cases, she may make a speech about how a woman's place is in the home, and everyone will applaud her departure into domesticity. (If she is leaving to take a promotion or a transfer, this trope does not apply.)
Unfortunately, there's also a more misogynistic, Writer on Board variation. These will have the woman demoralised to make a point, and that point is that women aren't made to rule. Either she screws up badly and gets fired or demoted, or she's completely overruled and undermined by a male character who automatically assumes control of the situation through no qualification other than having a Y-chromosome. She will either immediately accept this and take on a more stereotypically female role (most likely The Chick), or protest this demotion and be punished by the plot. Expect her to become a love-interest whether she likes it or not.
This can sometimes be the official form of Chickification, since the reduction in rank is often accompanied by a reduction in ability or effectiveness (making you wonder how she got promoted in the first place). If she stays in the story, the focus often shifts away from her career and more towards her emotional and romantic life.
Note that not all female characters who get demoted fit into this trope - this is for examples where sexism (either in-setting or by the writer) is clearly the primary factor. Quickly Demoted Leader when gender-neutral circumstances create the same problem.
Compare Hysterical Woman, which may go hand in hand with this trope.
In the manga Mars, male protagonist Rei originally has a female senior racing partner, Kyoko — an experienced motorcycle rider who teams up with him for the 8-Endurance race. After the race, Kyoko tells Rei's girlfriend, Kira, that that event was her last. She retires to support her husband, Akitaka "as his wife." Given that Akitaka (formerly a racer himself) lost a leg thanks to reckless riding, perhaps this would be understandable...except that he doesn't give up motorcycles, staying on to coach Rei while Kyoko fades from the picture. Just to add insult to injury, a later conversation notes that it was probably best that Kyoko retired when she did, since motorcycling is no sport for a woman and she'd just have been humiliated by the male racers if she'd stayed on.
Kyoko Aoi from Future GPX Cyber Formula SAGA gets demoted to vice-president of Aoi after Nagumo takes over the ownership of the team during the merge of the 2 Aoi teams, which resulted in Naoki Shinjyo fired from Aoi and he transfers to Union Savior. Subverted later when she gets her position back at the end of SAGA once Nagumo's true intentions are revealed.
Averted in Berserk. When main protagonist Guts was officially initiated into the Band of the Hawk, he was quickly given a very important job and soon after rank in the mercenary band as the captain of the raiders and his sword skills outmatched Casca's, whose skills were formally second to their leader's, Griffith. Despite this, Casca still remained Griffith's second in command and remained highly respected by her comrades. However, Casca did feel emotionally demoted by Griffith's relationship toward Guts.
Played with in the case of Hungary, in Axis Powers Hetalia. Upon discovering she's a woman, she decides it's time to give up her life as a soldier in favor of being "a freaking lady" and Austria's maid. Some time after her maid days, she shows up again in charge of her country's military, having gotten over her former trepidations. Given that Hungary's actions are meant to be an allegory for the real-life situation of the country of Hungary, this all is justified.
Buddy Complex features this with Margaret, who started out as Great Zogilla's special agent, whose task was to make sure that the Zogillan forces take control of what key possessions the Alliance had. She often butted heads with Alfried, who had more experience and understood military combat, and would often try, without avail, to get any of her plans executed. When Margaret finally got a chance to achieve her plan, however, it consisted of nothing more than an Attack! Attack! Attack! sequence that consists of a head-on attack and heavy missle bomardment that could easily be countered. Not only that, but Margaret almost dies in the process. Because this was an "all-or-nothing" plan to please her bosses, Margaret lost her job.
In The Halo Graphic Novel, there's a short story about a spectacularly talented soldier test-driving the famous MJOLNIR armor. We all expect the soldier to be Master Chief, but at the end of the story she takes off her helmet and we find out that Samus Is a Girl. Once revealed to be female, she says something about retiring in order to start a family and wanders out of the extended universe forever.
In Marvel both Maria Hill and UltimateCarol Danvers were in control of SHIELD but was then replaced by a Stark. Maria Hill stepped down of her own volition, while Danvers was replaced while she was in a coma, then she was replaced permanently by Fury.
Averted so far in Marvel NOW: Daisy Johnson is the director, with Maria Hill being second in charge. Then Daisy was forced out and Maria took command.
1938 theatrical serial Buck Rogers features Lt. Wilma Dearing, a capable commander in Earth's military forces of the 25th Century... until the arrival of Fish Out of Temporal Water Buck Rogers, who strides in and immediately assumes command, as if it were his inherent right to do so. And she just steps to the wayside, basking in his masculine superiority without argument; she even takes orders from him! The application of the trope in this instance is (very slightly) tempered by the era in which it was made.
By way of contrast, the television series from the 1970s was only marginally better in this regard. Though Buck was a Marty Stu in general in that series, with military commanders, scientists, and superhuman AI's bending themselves backwards to accommodate his old-fashioned ways— which always proved superior.
MST3K target Project Moonbase was ripped on mercilessly for its blatant sexism. The female Colonel Briteis, who apparently was better than the male Major Moore and now outranks him, is immediately subjected to blatant sexism when they are placed on a mission together. Her superiors jokingly threaten to spank her if she gets out of line and she spends the rest of the movie subservient to someone she actually outranks. In any situation of peril, she fails and the male hero is always lauded for his manly heroics. The Colonel even apologizes for "getting all female". The actual demotion doesn't happen until the end of the film, where Moore is promoted to Brigadier after they get married entirely because a woman has to be subservient to her husband. Despite how late this happens, the whole movie seems dedicated to this concept.
Averted in Warhammer 40,000's Ciaphas Cain, Hero of the Imperium series: When the 597th Valhallan is formed from what's left of two regiments, one all-male and one all-female, after being chewed up and spat out by the Tyranids, the post of colonel goes to the female Kasteen due to her being a few months senior (and a Noble). Cain notes on how this wasn't well-received by the remnants of the male regiment - the women were a garrison regiment while the men were actual front-line fighters (and their major had more combat experience). After teething troubles in the first book, the point is never raised again and the regiment works rather well.
Samantha Carter seems aware of and worried about this trope in the pilot of Stargate SG-1, as she's noticeably (yet awesomely) defensive about a male who outranks her being brought in to potentially lead another Stargate expedition. Fortunately, her apparent fears are unfounded, as Colonel O'Neill was tapped for a perfectly good reason and, witty banter aside, is perfectly respectful of women (scientists, on the other hand, have to do some proving of themselves.) Carter quickly becomes the show's Lancer and co-Smart Guy, and leads the team after Jack's eventual departure.
In the later seasons you had Colonel Mitchell being brought in to lead SG-1 after O'Neill's departure, despite Carter being of equal rank and actually having been on the team much longer. Indeed, many fans complained that Mitchell only made it on the team for failing to die after crashing his plane in the middle of a firefight. Although ultimately the trope was averted in that Carter and Mitchell both seemed to share equal command responsibility, and Mitchell's status got him the Butt Monkey treatment on more than a few occasions ("Don't touch that! <rolls eyes>. New guy!").
SG-1 being nothing more than an official TOE at the time, Col Mitchell's heading the team is more Jack O'Neill's idea of a practical joke than any denigration of Col Carter, who was by all accounts very very very happily heading up Area 51's R&D - and who refused to rejoin the team for some time (5 episodes IIRC).
Subverted on Homicide: Life on the Street. Shortly after Lieutenant Megan Russert is promoted to Captain, she is double-demoted back down to Detective. Although her initial promotion was an example of Political Correctness Gone Mad (it is flat-out stated that she was picked because 60% of registered Baltimore voters are female), she has proven herself to be a competent and well-liked administrator. Her demotion, therefore, is used as still further proof that Colonel Barnfather is a Pointy-Haired Boss.
In a 7Days episode, a new top-of-the-line American destroyer is sunk by a Chinese submarine, after the former opens fire (both are destroyed). A high-ranking admiral is on-board the ship at the time. Parker goes back in time to prevent the incident. Incidentally, the captain is an old friend, and flame, of his, being the first female captain in the US Navy. One officer even complains about the situation to his wife prior to boarding. Shortly after leaving port, the captain nearly shoots down a civilian airplane that was experiencing radio trouble and couldn't identify itself. The admiral has her relieved and takes command. Thing is, she acted in accordance with official policy when an unidentified aircraft entered range. The fact that she didn't open fire could probably be a violation. Subverted in that It turns out that it is the admiral who is the crazy one. He intends to martyr himself to fire the first shot in a war between the "Red Dragon" and the US. Luckily, the President outranks him. In the end, the same officer who complained expresses the desire to serve under the captain.
This happened so early in CSI: Miami it actually happened before the timeframe of the series: The pilot featured Megan Donner, the former day shift supervisor who comes back after a 6 months leave, only to find Horatio Caine in her position (and with no apparent hope of getting it back). It seems also that while H is kind of a Team Dad for the group Megan has a cold or simply professional relationship with most of its members. The character was eventually Put on a Bus when producers decided actress Kim Delaney had not enough onscreen chemistry with David Caruso.
A later flashback episode puts Caine on the case that would lead to CSI's creation with no mention of Donner.
CSI: Crime Scene Investigation original version averted it for the most part-Catherine was a Supervisor for several years, then became head of the Graveyard shift, though that only lasted two seasons. In the end, her demotion wasn't because of incompetence but because she chose to assume some of the blame for Ray Langston's rampant insubordination while saving his ex-wife from a serial killer. And when she finally got Put Ona Bus, the bus took her to a plum job at the US Justice Department.
In first colour Doctor Who serial we are introduced to U.N.I.T.'s specialist scientific advisor, Dr Elizabeth Shaw. Demoted to assistant to the specialist scientific advisor when The Doctor turns up and takes on that role. It is Lampshaded that her departure at the end of the season is due to her distaste for this turn of events.
Admittedly, Unfortunate Implications aside, this is at least justified. The Doctor is an alien with a higher IQ than the whole human race combined, and centuries of experience.
Kaoru Shiba of Samurai Sentai Shinkenger, the real head of the Shiba clan, who was using Takeru as a decoy to protect her. However, when she sees her vassals' unfailing loyalty to Takeru and is then unable to defeat Doukoku by herself, she steps down and formally adopts him so he can take over as clan leader in her place.
It's done differently in Power Rangers Samurai - Lauren Shiba arrives and wants to be co-leaders with her younger brother Jayden, but Jayden refuses and leaves as there should only be one leader. However, the other Rangers don't take too kindly to Jayden bailing and aren't too thrilled at Lauren taking over. When her sealing spell fails to work on Xandred and Jayden returns, she gladly returns control back to Jayden, realizing taking over a team that he had worked with and built up was stupid.
In season two of Continuum, the male inspector Dillon is replaced by a new female Da Chief. A few episodes later the new female boss is demoted and Dillon is back in charge. She is extremely upset about the turn of events and accuses Dillon of conspiring to force her out of the job because of her gender. However, the truth is much, much darker. Dillon got the job back because he made a Deal with the Devil and agreed to spear head the effort to turn the Vancouver Police Department into the corporate owned police force that we see in the bad future. The female inspector would have never agreed to this so was forced out.
Ridley. After her second mission Ridley is promoted to Knight Captain, not because she earned it, but because her Dad (the Lord Chamberlain) wants all her subordinates to act as bodyguards because he doesn't think she can handle being a knight on her own merits. In other words, it's a promotion instead of a demotion but the sexism is still there.
Jack. In order to become a knight, one has to win the Knight Selection Trials. Jack loses his first bout (To Ridley no less) and yet he is selected to be a knight because of his father's fame.
Maria in Sakura Taisen very quickly accepts a demotion to allow a guy to come in and take over the squad. She even comments that it's because she's a women that they don't listen to her. Yes, she shows great command skill later; but this is a rather lame way to justify the series Dating Simroots.
In Suikoden, the leader of the resistance Odessa is soon demoted upon meeting the hero to "dead", though not before she becomes an implied love interest ("You couldn't sleep either?" + speaking while looking at the stars = Love trope). She specifically comments on how she can't be a heroic leader and a woman at the same time when she shields a little kid from arrows. (Because, you know, the male hero would never do that and just let the kid die.) Her last words are essentially to never mention her again and throw her corpse into the sewers to never be found (both to keep the resistance hidden). Then find her big brother. The only sign of her existence in later games is that Flik names his sword after her.
Also, Apple in Suikoden II. After screwing up as a strategist, she decides (explicitly) that it is because she is a woman, and has you seek out a proper male strategist who can win battles for you. This is implied to be more her lack of self-confidence than anything else, though, as she still comes up with good ideas even after you find the new strategist.
Callo Merlose in Vagrant Story. Although she carries the title of "Inquisitor", she's told to stay out of the plot (lacking combat experience) before the opening sequence is even over, immediately gets kidnapped, and spends the rest of the game just standing around. This turns out to be her job: proximity to Lea Monde's aura is giving her a psychic talent that allows her to read people's innermost thoughts, sometimes without their knowledge, whether they want her to or not... which means the longer she stays with the villains who kidnapped her, the more she's finding out without having to actually do anything but stand around, demand answers, and get them.
Alys of Phantasy Star IV, who dies about halfway through the first act of the game, leaving her student, Chaz, as de facto leader. Unlike most other examples, she gets plenty of development (to the point of being a Decoy Protagonist), and appears at the end of the game as one of the spirits sheltered by Elsydeon.
X-Men: As the series began, the USA was featured as having a female President. She didn't have too much screen time or characterization before her term was over and Senator Robert E. Kelly took over as the new President. She completely left the series after that and we never learned what she did after no longer being the President.
Unlike other examples of this troupe, the former president wasn't demoted or killed, but simply ran her term. In other words, she wasn't replaced by a man for not being good enough; she was replaced simply because her job required her to be replaced anyway. That's got to count for a few brownie points...