The trial of the Knave of Hearts in Alice's Adventures in Wonderland is a classic example. The judge (the King of Hearts) asks the jury to consider their verdict before any evidence is given (the White Rabbit convinces him to hear the evidence, although none of the witnesses contribute anything useful), and the Queen has an odd view of how proceedings should go, believing that the sentence should come before the verdict. Also a blatant conflict of interest, as the Queen is the victim of the alleged crime.
In Goblet of Fire Bartemius Crouch didn't give suspected Death Eaters much of a chance to defend themselves, either. Ludo Bagman was only able to present a defense at his trial because he was, at the time, a popular Quidditch player and the rest of the Wizengamot wouldn't stand for him being thrown into jail without a chance to defend himself. Barty Crouch Jr.'s trial was a sham to let Crouch Sr. publicly disinherit his son. And they were lucky; many people, including Sirius Black, were taken to Azkaban without a trial. And there are absolutelyno allegories whatsoever in that.
Harry's trial in Order of the Phoenix. The Ministry at first didn't even plan to give him one, but Dumbledore changed their minds. Although Harry got off, it was made very obvious that they had attempted to rig it. They changed the time and place of the hearing at the last minute, hoping to convict him in absentia. He got no presumption of innocence, with Fudge cutting off his defense with the words "I'm sorry to interrupt what I'm sure would have been a very well-rehearsed story." Fortunately for Harry, Dumbledore was prepared for Fudge's underhanded tactics.
Fudge: Ah. Dumbledore. Yes. You - er - got our - er - message that the time and - er - place of the hearing had been changed, then? Dumbledore: I must have missed it. However, due to a lucky mistake I arrived at the Ministry three hours early, so no harm done.
Things don't get any better in Deathly Hallows when the Death Eaters take over the Ministry and put Umbridge in charge of trials accusing Muggle-borns of stealing magic.
Also, it appears that Hagrid was expelled from Hogwarts with the minimum of investigation- and though there was some very strong evidence against him, it seems rash considering it involved banning him from using magic ever again. Years later, when he falls under suspicion once, he immediately gets thrown into Azkaban (a.k.a the prison guarded by the soul-stealing, depression—inducing dementors) without trial. We can assume that this treatment is in part due to Hagrid being half-giant, but even so, its clear that the magical justice system is a sham.
Kafka's The Trial, in which the prisoner, Josef K, is never told what the charge is and cannot defend himself. Therefore, he is convicted and then sentenced to death without evidence of anything.
In the Thursday Next series, Thursday is put on trial by Jurisfiction for changing the ending to Jane Eyre. Two of her trials take place in Kafka's The Trial and Alice's Adventures In Wonderland; since she's read the books, though, she knows what rules to play by, and manages to get herself out of both trials.
Played fairly seriously in the Star Wars Expanded Universe novel "The Krytos Trap", with the trial of Tycho Celchu. The whole thing is quite complicated, but the nonhuman public tended to believe he was guilty and too much effort was put into defending him, while the human public tended to see it as a sham trial of an innocent man (it was, but in a bit of a subversion, it was for good reasons and the director of intelligence knew he hadn't done it, but suspected he might be a traitor anyway, and used the trial to flush the real mole out).
Famous Double Subversion in The Count of Monte Cristo - Dantes has just been framed for treasonous activities and goes before Villefort the Public Prosecutor alone in his chambers. Villefort is touched by Dantes' integrity and about to let him go when he sees that a letter which was part of the evidence against Dantes implicates his own father in treason and would ruin his career. At this point, the Kangaroo Court element kicks in as Villefort applies powers actually given to him under the law to have Dantes imprisoned indefinitely without trial.
Gently spoofed in The Phantom Tollbooth, in which (very short) Officer Shrift arrests Milo and Tock - because, among other things, "it's illegal to bark without using the barking meter" - stifling Milo's repeated protests by informing him that he's also the judge, and yes, the jailer too. "Guilty Guilty Guilty - Everyone is Guilty until proven Innocent!" He reverses his tune in the end. Subverted by the fact that unless you actually do something wrong, you get sent to a cell that has a tunnel leading out of it. He just likes to put people away.
The end of Headcrash has one of these, where a freshly-plucked-from-VR protagonist is placed before a court that appears to have dolls and teddy bears as the Judge and prosecutor, respectively. While in VR/cyberspace, the protagonist trashed the computer of a Michael-Crichton-Stand-In. Since toys judging him were avatars of the secretly-sentient supercomputers that ran the world, he was charged with murder and given a life sentence on a deserted beach. Which turned out to be Hawaii, because the supercomputers have a sense of humor.
The trial in To Kill a Mockingbird is essentially one of these. Whilst Atticus' eloquent, principled and passionate defense clearly exposes the truth of the matter to all and sundry - namely, that Tom Robinson never raped Mayella Ewell, and that Mayella and her father Bob are lying - the verdict, tragically, is never in any real doubt; it's Alabama in the 1930s, Tom Robinson is black, and Mayella and Bob are white. The trial wasn't rigged as such, it was conducted in a completely fair manner - if anything, the judge went out of his way to point out blatant contradictions in the prosecution's case, and the prosecutor wasn't really putting up much of an effort - it was just a sad fact that no white man in the 1930s would rule in favor of a black man in court. Despite that, Atticus claimed that they were actually quite close to a hung jury. Even if the jury was always destined to vote against Tom Robinson it is pointed out after the trial that the judge picked Atticus as the defense lawyer because he was the only lawyer who had anything close to a chance of winning a black man's case.
Clevinger's trial in Catch-22. Lieutenant Scheisskopf is the judge, prosecutor and Clevinger's attorney.
In Operation Excalibur, Grayson Carlyle goes through a Kangaroo Court, but he's fully aware of it from the start, and has been instructed by the government employing him to use it to find employment with a group planning treason.
Justin Allard's trial early in Warrior: En Garde, which is even all but acknowledged as such by some of the involved parties but goes through anyway in part due to political pressure to make him a scapegoat. Also so he has a plausible excuse to outwardly turn against his former government while in reality becoming the mole.
In Dragonlance, the Gnomes' courts always work this way. The judges are on a scale (with three on one side and one obese Gnome on the other) and the side that hits the floor decides on the sentence. The obese Gnome has all the authority however, the others are ignored. A trial shown in the book works by lawyers pouring gold and pastries into the obese judge's pan. The rich guys get off completely free, the poor guy also with them is given a light punishment.
In The Eye of the Storm, the Galactic judicial system is shown to be one of these, serving the whim du jour of the Darhel, when trying Mike O'Neal, Jr.
A non-series mystery novel by Ellery Queen, The Glass Village, has a murder that takes place in an extremely small community. The locals decide that a tramp is the murderer and form a jury out of the 12 adults in the community, even though some of them are witnesses to events, court clerk, court reporter, etc. The Judge allows this to happen because he is sure that the conviction will be quashed by a higher court's viewing these procedural irregularities, but the protagonist believes that the jury will wrongly convict, then lynch, the defendant and solves the crime at the last minute.
Honor gets one in her very first book when the People's Republic of Haven sentences her to death for the destruction of a Havenite freighter which they claim was unarmed but which packed the firepower of a battlecruiser and nearly destroyed Harrington's own ship, to cover up the fact they had the armed ship in Manticore territory. As she's tried in absentia, it's not like anyone cares, and the two nations are soon at war anyway. Several books later, she's captured in battle, and the bloodthirsty new rulers of Haven are looking for a legal way to get rid of her (as a prisoner of war, she can't be summarily executed) and hey, look, she's got a death warrant predating the war!
Subverted when Thomas Theisman stages his coup and overthrows Oscar Saint-Just. Saint-Just asks cynically if he'll get a show trial just like all the ones he's been responsible for. Theisman informs him there have been enough of those sort of trials... and shoots him on the spot.
In book 4 of the Wheel of Time series, Suian is on the receiving end of one of these courts, led by Elaida. Although all of the Sitters were handpicked by Elaida in order to get Suian deposed, stilled, and executed, the rebel Sitters insist on claiming that what was done was legal, as Elaida had the bare minimum of Sitters required. It's the old Quorum of the Senate argument.
In Robert E. Howard's "Queen of the Black Coast" Conan the Barbarian is in flight from a court where they insisted that he had to tell them where a friend was. The friend in question was a young soldier who had killed a captain of the guard for "offering violence" to his girlfriend and had to flee with her to avoid the wrath of the law. Conan believed that his friend was in the right and refused to betray him, and when the judge threatened to have Conan thrown into the dungeon until he betrayed his friend, Conan split the judge's skull and got out of there.
In Dudley Pope's Ramage's Trial, Ramage is court-martialled for relieving another captain of his command on the high seas. The presiding officer, Port Admiral Goddard, has been after Ramage for years, including bearing false witness at earlier courts-martial, and seizes the opportunity to rig the trial by suppressing any testimony that would support Ramage's defence (that he acted out of extreme necessity because the captain he relieved was barking mad), including several witness statements that explain how mad Captain Shirley had a broadside fired at Ramage's own ship. He also sets to work to intimidate the panel of captains forming the trial board with not-so-veiled threats to wreck their careers if they don't vote "Guilty". It is only the arrival of an agent of the Lords of the Admiralty themselves that sees Ramage get a fair trial at the last.
The Solomon Kane poem The One Black Stain deals with the aftermath of the (Real Life) trial and execution of Thomas Doughty by Sir Francis Drake:
Solomon Kane stood forth alone, grim man of sober face: "Worthy of death he may well be, but the trial ye held was mockery, "Ye hid your spite in a travesty where justice hid her face."
In The Tomorrow Series, Ellie and her friends are put on trial by the enemy after being captured. Since the proceedings are not in English, there are no defense lawyers, they're guilty, and the court consists of enemy officers, it's no big surprise when Ellie and Homer are sentenced to death, the rest to very long prison terms. Later, in The Other Side of Dawn, Ellie is informed that her trial took place without her being present after she's been captured again, this time under a pseudonym. If the other side knew she was Ellie Linton, she'd have already been shot.
In the sixth book of the Warrior Cats series, what Tigerstar calls a "trial" for TigerClan's prisoners, who are innocent cats whose parents were from two different Clans. It's really nothing but whipping up hatred for the half-Clan cats so that their own Clanmates would mistrust them enough to want them driven out or killed.
Quantum Gravity apparently put Zal through something akin to a hearing by the elves. He noticed the vacancies in the council where his supporters should have been.
Tyrion Lannister is the victim of one in the first book. After being kidnapped and taken to an impregnable fortress, he has to offer to confess in order to be let out of a cell specifically designed to make its occupant kill themselves or die accidentally, and then has to demand a trial by publicly shaming his accusers to avoid going back there. The trial in question would be judged by the six-year old son of the man he's accused of murdering (who already shows a fondness for having people executed) and presided over by the child's mother (who, in addition to being the one to accuse him of murdering her husband, is sister to his other accuser, and is quite clearly mad). To avoid this, his only option is trial by combat (he's a dwarf and his opponents are seasoned knights,) and when he demands a champion (as is his legal right) he is denied his choice and has to ask for a volunteer from the rabble of soldiers and mercenaries employed by his accusers. He comes out of the trial alive, and with a battle-hardened killer and a load of disgruntled barbarian tribesmen as his loyal followers.
Tyrion is again put on trial for murdering King Joffrey. The judges are either family of the victim (and hated him even before the alleged crime), family of someone who could have been collateral damage, or have a political interest in the whole affair. The nature of the trial means all the evidence against him would be circumstantial, and the witnesses called either hate him, get his words out of context, or have been bribed to outright lie. Tyrion is prevented from speaking in his own defense or cross-examining witnesses.
The Brotherhood Without Banners puts every one of their captives "on trial" before executing them, but it's clearly just a formality to give them the illusion of justice. Sandor Clegane calls them out on having no intention to give him a fair shake. Surprisingly, they actually admit that there isn't enough evidence to say that Sandor is guilty for his various alleged crimes, and only seek to condemn him on a single murder witnessed by someone present at the trial. Ultimately they grant him a trial by combat. The pyrophobic Sandor must contend with an opponent wielding an flaming sword, but he does manage to shame the man into removing his armor first and wins, after which they let him go.
Subverted in Starship Troopers: At first Rico mistakes the captain punishing fellow recruit Ted Hendrick without letting him defend himself and then his summary court-martial (caused by Hendrick accidentally admitting he had struck gunny Zim during training) as this, but then overhears Frankel berating Zim for letting Hendrick hit him and realizes the captain was trying to prevent Hendrick from going to a general court-martial instead of a summary one, and that the Kangaroo Court that kicked him out of the service was the only way to avoid hanging him. When Rico later finds himself in a similar situation, he has the sense to keep his fool mouth shut and accept administrative punishment, so he gets a lashing but is allowed to remain in the Mobile Infantry.
There is an example when McCoy is tried before the Romulan Senate for spying. McCoy proceeds to turn it on its head, using his Right of Statement (granted by Romulan law and allowed to reinforce the impression of legality) to gain time and lampshading the situation (even stating that the Klingons would have given him a fair trial) until The Cavalry, including a Horta (who, being a silicate-based lifeform that appears to be made from Earth and is invulnerable to disruptors, the Romulans mistake for an Eldritch Abomination) and commander Ael, who humiliate the corrupted Romulan leadership and sets in motion a revolution.
Normal Romulan trials subvert this: the burden of proof is on the defendant, but that's only because to even have the arrest the prosecution had to get together enough evidence to get him convicted, and if the judge (normally impartial) finds that the defendant is innocent and the the evidence against him was forged the prosecution will get the maximum sentence for the crime the defendant was being tried for. And Romulan law includes the death penalty.
In the third Kitty Norville book, Cormac is accused of murder. He shot someone to protect his friend Kitty, with half a dozen witnesses. However, the person he shot was a Skinwalker and in this setting the Broken Masquerade is still fresh enough that people barely even believe in vampires and werewolves, let alone esoteric monsters like that. And half the witnesses had already been persecuting his friend Kitty due to Fantastic Racism, so testifying in Cormac's defense would be admitting they were wrong before.
The Windrip regime tries dissidents in kangaroo courts in It Can't Happen Here. Doremus is hauled before one before being incarcerated at Trianon.
Visser One is tried as a traitor and an Andalite sympathizer, but in actuality, Visser Three set up the whole thing and convinced the Council to go through with it in order to usurp her position. Unusually, she actually did commit treason years earlier, by way of "sympathy with a subject species", and this does come to light during the trial.
In the aftermath of the war, it's also made clear that the yeerks in command of the invasion essentially received these. While they were guilty of numerous war crimes, by actual legal standards so were the Animorphs and the Andalites. But no human was going to vote against conviction, let alone put the war heroes on trial.
In Harry Harrison's Bill the Galactic Hero, the titular character is put on trial for going AWOL (he got lost on the Planetville capital of The Empire after his map is stolen (losing one is a capital crime). The jury consists of 12 robots programmed to only give one verdict. Subverted in that they end up declaring him not guilty, to the shock of everyone in the room, but only because they received a signal overriding their programming. Bill is actually supposed to go on a Suicide Mission.
Subverted in Waverly when a Jacobite is put on trial for treason. The court is as fair as might be under the circumstances especially given the tensions of a Civil War. At the same time the issue is not in doubt because the defendant admitted to being a ringleader in the Jacobite camp and logically either the defendant was guilty of treason for rebelling against King George or The Judge is guilty for taking sides against Bonnie Prince Charlie.
In Anathem, Erasmus is forced to partake in a public interview much like a trial to explain and defend his actions. His interlocutor is heavily against him and poses all of his questions to in an effort to make Erasmus look foolish. Erasmus immediately realizes that he'll have to draw on all his powers of argumentation to get out of the interview unscathed.
Jack Aubrey suffers through one of these in the Aubrey-Maturin series — framed for financial crimes, he is given a sadistically long show trial whose judge is his father's political nemesis.
According to Roger Ebert's Little Movie Glossary, the Definitive Western Cliche is not "He went that-away!" or "Head 'em off at the pass!" It's "We're gonna give him a fair trial. Then we'll hang him."
In the book "Blade of the Guillotine" from the Time Machine Series; if you're not carrying the correct item at one point, your character is arrested as an enemy of the French Revolution. You demand a fair trial and your captors respond that you will get a fair one...and then you'll most likely be guillotined.
Charles Darnay undergoes two trials by kangaroo court in A Tale of Two Cities. In the first, the court is determined to put him to death as an emigrated aristocrat but he is saved by the testimony of his father-in-law, Dr. Manette, a hero of the Revolution. Immediately after his acquittal, though, he's arrested again. This time Dr. Manette's testimony against Darnay's father - a genuine evil aristocrat - is used against the younger Darnay against Manette's will and Darnay is sentenced to death.
In the World Of Warcraft novel Warcrimes, Garrosh Hellscream is put in trial in Pandaria, with the Horde that opposed him in the civil war in charge of his defense, Baine Bloodhoof as his personal lawyer even though Garrosh killed his father in a duelnote It's worth noting that Baine actually realized Garrosh was manipulated and tried to work with him until it became clear that Garrosh was very bad for the Hord as a whole, Taran Zhu presiding as the judge while recovering from a serious wound given to him by Garrosh, the Celestials of Pandaria, a land who Garrosh looted and pillaged, as the jury, and Garrosh himself not even attempting to defend his actions or take the trial seriously, and the trial only intended to decide Garrosh's sentence. However, it is averted in that Taran made sure the rules of the court were followed exactly by both sides, Baine took his role seriously by calling out Vol'jin and Thrall for their own actions against Garrosh, and both the Alliance and the Horde are determined to make sure it is a fair trial, lest Garrosh become a martyr. Subverted in the fact that the Celestials had no intention of executing Garrosh and actually the trial was a Secret Test of Character for the Alliance and Horde themselves.
In The Stranger it's a fact that Meursault killed a man, so the court proceedings are meant to prove whether or not it was premeditated. Since there's no evidence to suggest it, the trial relies entirely on character witnesses, most of whom are actually supportive of Meursault. However, the prosecutor relies entirely on circumstantial testimony, insane leaps in logic, and outright theatrics to "prove" the act was premeditated. And it works. As Meursault himself notes, he's completely removed from his own trial.
In the Xanth novel Dragon on a Pedestal, a goblin chief intends to put a harpy man through one of these to justify his execution for romancing his daughter. The trial doesn't even have a prosecution or defense to begin with, consisting only of judge and jury, and it's only when the protagonists kick up a fuss that he grudgingly allows for lawyers.
In The Diamond Age, the Confucian courts of the Coastal Republic are a downplayed example, in that there are no procedural protections for the accused; the judge is detective, Judge, Jury, and Executioner. In the first trial we witness, the judge declares the defendant guilty before he hears anything out of him, and when the defendant asks if he gets to defend himself, he's told, "Don't be an asshole." That said, the court is actually rather honest, though that may be a function of the judge in question being a good and honest man; he just doesn't care much to waste time with formalities, and the defendant in question really is guilty as sin.
In the James Bond novel The Man from Barbarossa, the pro-semite terrorist organization Scales of Justice arranges a trial for a man they captured, insisting that he is the war criminal Josif Vorontsov who took part in the Babi Yar massacre which happened during the Operation Barbarossa in World War II. Bond and co. are send to infiltrate their premises as a camera crew to find out what is really going, since their superiors know that the captured man is not really Vorontsov.
City of Light: Ravidel Shand is tried by the senate of Palidia on charges he isn't notified of beforehand, making him unable to mount a defense. The prosecution witnesses are all criminals he arrested before, with some false stories of him brutalizing and extorting them, aside from the main characters (though even they have no hard evidence of any crimes he committed). All of his entirely valid objections are overruled by the judges. Needless to say, they convict him.
The trial of Trellis in At Swim-Two-Birds, in which his own fictional characters serve as judges, jury and witnesses against him. It all builds to his execution, which is averted at the last moment by the protagonist (Trellis' author) reconciling with his uncle.
The Crowner John Mysteries: After being framed for rape in Crowner's Quest, John is dragged before the Sheriff's Court. As the Sheriff is a co-conspirator of the those responsible for the Frame-Up, a guilty verdict and a swift execution is a forgone conclusion. However, a most unexpected witness appears to save John's bacon.
Arc of Fire: Mohender Ghosh does not get anything near a fair trial by the Atma Knights' High Council, inspiring Jaelen to bust him out of prison.
Wolf Hall has Thomas Cromwell presiding over two: that of Sir Thomas More, and later Anne Boleyn and her five "lovers". There's no question of actual justice being involved; the trials are held because Henry wants them out of his hair and killing them is the quickest way to do that. Cromwell uses Anne's trial to get his own private revenge on the five men who he blames for Cardinal Wolsey's death, but he's also driven by the knowledge that he'll lose his own head if he doesn't do this, and so works up a "case" based on rumors and false confessions. (And when it happened anyway four years later, he didn't even get the courtesy of a sham trial.)
In The Golem's Eye from The Bartimaeus Trilogy, we learn that when Kitty Jones, one of the protagonists, was 13, she and her friend Jakob were viciously attacked by a magician who set a demon to cast the Black Tumbler on them (in retaliation for accidentally breaking his windshield with a cricket ball). Kitty, possessing Resilience, was only knocked out for a few hours, but Jakob was severely disfigured for life and temporarily blinded. Following the incident, Kitty was invited to bring her case to court. Even though all of her friends and family urged her to decline the invitation, knowing that it would be a kangaroo court and she would get nothing like justice, she accepted anyway. Things seemed to go well enough at first, with the magician not being present at the start of the hearing and being put down for contempt of court, while Kitty is allowed to tell her side. Sure enough, however, once the magician, Tallow, arrives, he tells his version of events which excoriates her and Jakob and presents himself as a saint. The judge is a fourth-level magician and Tallow's story is accepted without question. Kitty is made to pay a fine of 100 pounds for wasting the court's time, plus a further fine that is much more massive for Tallow's contempt of court in being late, as the loser pays all costs. This is the start of Kitty's days with La Résistance, as the leader of the Resistance group is present at the hearing and realizes based on Kitty's version of events that she possesses Resilience. He offers to pay her fee and has her join the group.
Alexis Carew: Alexis' Court Martial at the end of Mutineer. Captain Neals and his cronies, excuse us, officers are in lockstep, the tribunal believes their word over that of Alexis and the entire enlisted crew of HMS Hermione, her JAG is openly more interested in making sure the Navy looks good than in defending her, and the only sympathetic officer on the ship is too scared to testify. Fortunately for Alexis, a Hanoverese ship delivers HMS Hermione's log to the tribunal under a flag of truce, which her civilian co-counsel presents over the JAG's objections. The logs show each and every one of Neals's abusive actions towards Alexis and the other crew (including disrating and flogging her for refusing to Kneel Before Zod on grounds that "I will bow to no one but my queen", which was the trigger for the mutiny itself), and the panel acquits Alexis (and then the enlisted men after Alexis threatens to leak the logs to the public), beaches Neals on psychiatric grounds, and then tests her for lieutenant.
The Crimson Shadow: Duke Morkney presides over a court like this. He doesn't hear any evidence, and no one is ever acquitted. The punishments, naturally, are excessive.
Victoria has a variety, befitting a story about the violent dissolution of the United States. In particular, the Deep Green Paelopitus have a jury of animals and a druid interprets their verdict.
The Magic Pudding: The final drama of the book is when the pudding thieves get the pudding owners shanghaied into the court of Tooraloo by claiming that they (the thieves) are the actual owners and that Bunyip, Bill and Sam are the thieves.