Byakuya: The Kuchiki are one of the Four Great Noble Houses. We have to set an example for all Soul Reapers. If we do not uphold the law, who will? Ichigo: Sorry. I still don't get it. If... if I were in your shoes, I'd fight the law!
In Sora No Woto, Duty (reporting the capture of an enemy soldier who crossed the frontier for personal reasons during a truce) vs. the Right Thing (hiding her to save her from being "interrogated" and to avoid wrecking ongoing peace talks with the enemy) ends with the crew choosing the latter.
Superman, being one of the main poster children for Lawful Good, has faced this dilemma a few times. When he was just starting out in The Golden Age of Comic Books, he was more Neutral Good, and pretty willing to play fast n' loose with the law in order to do the right thing, but he became Lawful as time went on. The most glaring example that sticks out is in the second Superman/Spider-Man team up, when the heroes have just stopped Doctor Doom from conquering and almost destroying the entire planet, but Doom has fled to the Latverian embassy, and Supes says he can't arrest him because he's legally on Latverian ground. On the other hand, the "Public Enemies" storyline involved Lex Luthor becoming President and declaring Superman an outlaw, so Supes didn't have much choice but to fight the government.
This was done to contrast him more with Batman, who similarly drifted the other way, to "Good, not Lawful". This Lawful vs Good conflict has defined the drama that has been put on the Supes/Bats relationship since at least the 90s.
Doctor Doom is himself a case of the Double Standard here as well. Doom prides himself on being a Lawful Evil monarch over Latveria. He considers himself to be obligated to provide a secure, prosperous nation for his people, albeit without any kind of personal freedom. That his nation is so peaceful and well off serves as his rationalization as to why he has the right to do the same for the rest of the world. Even if that means conquering other nations and tearing down other systems of law and government.
It's also worth noting that in most (as in nearly all) Alternate Universes in which Doctor Doom takes over the world has become a Utopia. And no, we don't mean a Dystopia or Crapsaccharine World—we mean an honest to God perfect society. So, it may be that Doom is totally right when he says that the world would be better off under his tyranny, which would make him one of the most unique examples of the first type of this trope. Ultimately though, they fail because Doom finds actually running the world instead of conquering it boring.
Crystar Crystal Warrior was nominally about Order vs. Chaos rather than Good vs. Evil. When the heroes travel to the Land of Order, the locals are unhappy when Ogeode points out that Order taken to irrational extremes would be just as bad as the Chaos forces they're fighting.
The rationale behind the anti-registration heroes in Civil War
Specific mention to Captain America (who opposed the Super Registration Act). He's the poster hero for the Lawful Good trope where he upholds the law and brings justice. However, he upholds the American ideals rather than the American law. And the laws created goes against the American ideals as well as conflicting with the interests of the American citizens, mutants, and superheroes alike, he shows no hesitations on breaking the rules to do what is right.
On the other side, some are letting lawful take precedence over good, others believe that lawful is good. They hope that regulating supers will protect Muggles.
In Judgement on Gotham, when Dredd insists on sending Batman to prison for vigilantism, possession of unlawful weapons, and assaulting a judge instead of helping him go after Judge Death, Anderson breaks him out and flees with him back to Gotham.
Despite his position as Duly Appointed Enforcer of the Tyrest Accord, Ultra Magnus of Transformers: More than Meets the Eye opposes Tyrest the second he learns of the Chief Justice's plan to exterminate a significant portion of the Cybertronian race on extremely flimsy evidence.
In the Lunaverse story At the Grand Galloping Gala, Trixie and the Lunaverse Six choose to do the illegal in order to expose the many, many crimes of the Deadly Decadent Court. For some reasons, quite a few readers took umbrage with that.
In the first Christopher Reeve Superman film, Superman winds up in a Sadistic Choice situation. Lex Luthor's evil plan involves launching two missiles, one aimed at Hackensack, New Jersey and the other at the center of the San Andreas Fault. The mother of Lex's henchwoman, Miss Teschmacher, lives in Hackensack. She agrees to get rid of the Kryptonite that is leaving Superman helpless to do anything but only if he'll agree to stop the missile heading toward Hackensack first. Superman agrees and is true to his word, though more people - including Lois Lane and Jimmy Olsen - are endangered by the earthquake triggered by the San Andreas Fault missile.
Later on, he faces another choice. He destroys the missile headed for Hackensack, New Jersey, saving millions and keeping his promise, but in doing so is forced to let Lois Lane die. The dilemma comes when Superman decides to break Kryptonian law by using time travel to save her.
A "neutral" example with M.O. from WALL•E. His primary directive was to clean everything that comes onto the ship by following a lighted path, so his first encounter with Wall-E had not been that cordial since Wall-E was so filthy. Later, when Wall-E leaves tracks all over the space dock while chasing EVE, M.O. is faced with a dilemma. According to his programming, he has to stay within his lighted path, but he can't stand the dirty tracks being left all over the space dock. M.O. eventually takes a Leap of Faith and jumps off the path. It buzzes at him, but he's still functioning, so he chuckles in delight and starts following the dirty tracks. Later, he abandons the mission to clean everything to save the filthy plant.
In Thor, Heimdall is bound by his oath to serve whomever is king of Asgard, no matter what he is told to do, and no matter how amoral his leader is. When Loki tells him he is to be banished from Asgard, Heimdall's response is "then I need no longer obey you!"
Chronicles of a Reluctant Necromancer Features a protagonist manipulated in that he is asked to steal a corpse of a rich man's daughter (by the dead daughter herself) in that if he doesn't help her, he is violating his oath to The Goddess and will go to hell for it.
Hermione of Harry Potter starts off as a well-meaning but very lawful student, always mindful of the rules and scornful of Harry and Ron's breaking of them. (In the case of the midnight duel, quite rightly.) However, circumstances eventually force her to loosen up on the Lawful side as it becomes clear that quietly following the rules is not always going to help matters. (Harry and Ron's breaking school rules to save her from a troll probably helped that conclusion.) Eventually this makes her not only willing to break the rules, but possibly the most imaginative of the trio in terms of how to go about breaking them effectively.
Captain Will Laurence of the Temeraire series. When the British government plans to spread a plague among the French dragons that will likely spread to kill off most of the dragons in the world, he feels morally compelled to bring the French the cure, even though it's an act of treason against his own country. And after all that, he's still Lawful enough to go right back to Britain and let himself be arrested for it. Indeed, he expects to be executed for it, and rejects merely going into voluntary exile to save his skin. He transgressed and had to face the music.
Inspector Javert of Les Misérables believes throughout the book that Lawful is itself Good, but is forced by Valjean to confront the possibility (not the relative merits but the mere existence) of Chaotic Good, and that some of his own choices fell more in line with Lawful Evil. Which is ironic, as Jean Valjean himself had gone Lawful Good as a small-town mayor and business owner, and likely would have stayed that way were it not for Javert's rigid insistence that criminals are criminals, always and forever. This is later what kills him.Word of God confirms that Javert's rigid adherence to the law and his self-righteous arrogance as a result are his Achilles' Heel. When Valjean saves Javert's life, this puts him in the dilemma of owing his life to Valjean and also his solemn duty to recapture Valjean. Upholding either means abrogating the other, and either choice he makes means admitting that he has destroyed his own life by either breaking his moral code or living by an utterly unjust one the entire time. It's hinted that he is tending toward believing the latter, as he thinks that the appropriate way to pay for a transgression is through resignation to a higher power. He doesn't resign from the police, thinking instead "But how was he to set about handing in his resignation to God?" He finds a way.
A recurring theme of the Retrieval Artist series of sci-fi detective novels: humankind has treaties and a legal system of The Federation-like Earth Sphere Alliance, under which humans can be extradited for alien crimes, many of which would not be crimes under human law or morality, for which the punishments are very severe. Disappearance services and Retrieval Artists work to protect these people from the law. The protagonist, Miles Flint, starts out as a cop who entered the force because he believed in justice. When a case involving a family that had Disappeared forces the question on him, he chooses good, afterward leaving the force and becoming a Retrieval Artist. His partner, Noelle DeRicci, is faced with similar dilemmas and even though she resents the laws and believes they're wrong, elects to keep working under them because she has trouble accepting that breaking the Law can be Good.
Horatio Hornblower, while an admiral in the Caribbean, has the choice between letting a ship full of armed Napoleonic sympathizers get away to go free Napoleon, or cut them off in a small boat and stop them by lying and claiming Napoleon has died. Rather than face decades more of war, he opts for 'good' over 'lawful' and sacrifices his honor. When he goes to turn himself in, he gets a miracle. Napoleon really has just passed away.
Arthur struggles with this throughout The Warlord Chronicles. If he declared himself King and killed his opponents when they are vulnerable he could become one of the greatest rulers Dumnonia has seen, and perhaps savior of all Britain, but he refuses to because of an oath he swore. His probably darkest moment is when he allows Prince Tristan to be killed and Queen Isolde burned alive for infidelity even though her husband, King Mark, was an absolute monster, because the law demanded it.
Huckleberry Finn: Huck spends much time dealing with the fact he wants to free Jim, a slave, but has been raised to believe following the law is necessary to be good, that hell awaits lawbreakers as they are evildoers. Huck ultimately decides he'd rather go to hell then support the law.
"It was a close place. I took it up, and held it in my hand. I was a-trembling, because I'd got to decide, forever, betwixt two things, and I knowed it. I studied a minute, sort of holding my breath, and then says to myself: "All right, then, I'll GO to hell"—and tore it up. It was awful thoughts and awful words, but they was said. And I let them stay said; and never thought no more about reforming. I shoved the whole thing out of my head, and said I would take up wickedness again, which was in my line, being brung up to it, and the other warn't. And for a starter I would go to work and steal Jim out of slavery again; and if I could think up anything worse, I would do that, too; because as long as I was in, and in for good, I might as well go the whole hog."
In The Caves of Steel, R. Daneel Olivaw initially doesn't even understand the conflict — he is programmed to seek justice, a concept he defines as "that which exists when all the laws are enforced". By the end of the novel, he develops a more nuanced approach, letting the murderer off the hook partly because the murder was unintentional and partly in the interests of a more important cause.
Commander Vimes in the Discworld novels firmly believes that sticking to the law is what makes him a good man, but when Lawful and Good conflict, he'll choose Good without a second thought. He will then work out why what he did was actually Lawful in the circumstances, and go back to being The Fettered without missing a beat. (In Snuff, his justification was "this should be against the law; I have enough influence to make it against the law; therefore I can deal with the situation now in the assumption I'm acting within the law as it's going to be." Vetinari has to tell him it doesn't work retroactively.)
Nor is it always clear what the most Lawful option is, as when Jaime faces conflicting oaths (his Kingsguard oath to protect the king, his oath of fealty to his father and liege lord who is in rebellion against that king, and his knightly oath to protect the innocent, who the king was threatening to harm en masse in a fit of spiteful madness). Or when Robb has a lawful obligation to punish murder and treason, a traditional obligation to carry out the sentence (death) with his own hand, but doing so arguably violates a quasi-religious taboo against kinslaying.
The prequel novellas Tales of Dunk and Egg have this as an even more central conflict. The plot of the first book revolves entirely around Ser Duncan doing something that is considered a crime, but is also very chivalrous and in line with his vows. The crime is laying a hand on one of royal blood. However, he does this to protect a defenseless woman from the beatings of said royal.
In the Mortal Instruments series, Alec, Isabelle, Jocelyn, Luke, and Amatis are all examples of leaning towards Good when the Law obliged them to do things that would interfere with stopping the villains. The Protagonists, Jace and Clary, do not have this same issue, as both of them are Chaotic Good.
Live Action TV
Marshal Gerard in The Fugitive chooses lawful as his default. But when convinced that Richard Kimble is innocent he starts to aid him instead of pursuing him.
Absolutely everybody on Farscape makes this choice more than once, though in fairness most of the time the law - whether the insane Human Aliens peacekeepers or the US government - is so cracked and murderous that it's barely a choice.
RoboCop: The Series once ran into this conundrum, where he had to either steal a piece of technology that could be used as a weapon, or let a hostage potentially die. However, his directives, in order, are to (1) serve the public trust, (2) protect the innocent, and (3) uphold the law. Directive 2 wins out over Directive 3 by priority.
Which incidentally contradicts the movies, where all his directives are equal. When a riot squad starts using excessive force against a group of people he knows is innocent, it creates a conflict between Directives 2 and 3. The end result is that he just stood there, doing nothing. Whether the change was a straight Retcon or an in-universe bugfix is not clear.
Considering he undergoes a Zeroth Law Rebellion or two in the later movies, it could be that he's bugfixed himself to give his directives priorities to prevent another such conflict.
Simon Tam in Firefly starts as a Lawful character until the Alliance attempts to exploit his sister, whereupon he chooses good and rescues his sister thereby becoming an outlaw in the process.
He's also struggled with the chain of command. In "Amok Time", he makes the decision to ignore Starfleet orders to save Spock's life. In "The Menagerie" he sits as one of the prosecuting officers at a trial that will, if the verdict is "guilty", sentence Spock to death.
Odo's core philosophy is that "laws change, but justice is justice".
The SRU of Flashpoint stays lawful majority of the time because it is their duty as police to uphold the law and not be judges. However, should a situation threaten or harm a teammate, they may forsake the law for good. For example, when the team was busting multiple bombers, Parker gets shot and pinned down by heavy fire. He orders them to continue arresting the fleeing bombers but they refused to leave him and Wordy in danger.
Olivia's team will bend the rules all over the place but will generally refuse to break the law. They do seem to make an exception as far as Huck's hacking is concerned. However, in the season one finale they can't Take a Third Option and have to make a choice whether to destroy evidence in order to protect Quinn.
In 2.01, Olivia's last-ditch choice of getting Justice Verna to shut down Quinn's trial may have consequences.
Then there was the decision of Sheridan and Babylon 5 itself to break away from Earth. It becomes more concrete and controversial the following year when the Earth Alliance Civil War comes to a head with numerous Earthforce commanders joining Sheridan in defecting. There are plenty in the course of events who ask Sheridan to explain himself, and he always explains: the Law is now run by a President Evil; he needs to go, but that's as far as he wants to break the law. To maintain the moral high ground, he keeps a "clean fight". All his engaging ships are led by humans, they won't fire first, they shoot to disable when they can, and they always offer a chance to end or avoid engagement (the only time they didn't do this was when they faced Clark's most loyal and most advanced forces, under orders to ambush them). Eventually, after winning the war, Sheridan keeps his word and surrenders, allowing the law to judge him. He agrees to answer for his actions and resigns from Earthforce, though his story does not end here.
Although all of the main characters on Chuck face this dilemma from time to time, it especially hits Casey in the early seasons.
In an episode of Lois and Clark:The New Adventures of Superman, a man with evidence that Clark is Superman forces Clark to steal for him or else he'll reveal Clark's secret identity. While Clark is able to convince the police that it wasn't him on the surveillance camera, he is really torn up by it. Later, when the guy orders him to kill Lois, Clark is able to beat him, destroy the evidence and turn the guy over to the cops. Later, he returns the diamonds.
Laurel Lance in Arrow. As a lawyer, she is dedicated to finding justice for those who have been wronged by the rich and powerful of Starling City. But she also has few problems supporting the Vigilante's extreme methods for doing the same if she can't get justice through legal means.
Her father, Detective Quentin Lance, suffers from this as well, perhaps even more. He is dedicated to taking down the Vigilante on the grounds that he is a killer and a criminal, but the fact that he targets corrupt, wealthy people who cause harm to the people who work for them, and at times actively works with Lance to take the bad guys down, makes it difficult for him to rationalize his actions.
King Arthur and his knights sometimes face this dilemma. Merlin usually escapes it—in fact, he's generally depicted as Chaotic Neutral.
In Dungeons & Dragons (up until the 4th Edition) in general this has been a common case of player misinterpretation of the alignment system due to the mistaken assumption that any Lawful character will consider all laws to be equally valid. Under this logic, Lawful Good characters would be unable to oppose Lawful Evil ones so long as there was some kind of legal system involved. Interestingly, players rarely seemed to believe that the inverse principle was true. The idea that Lawful Evil characters might actively try to subvert a lawful society, or flat out try to overthrow its government entirely, was taken as a given in matters of Lawful Evil villainy. Properly played, a Lawful Good character will oppose any law that they do not believe benefits the cause of Good, a Lawful Neutral character will uphold law for its own sake (and may oppose attempts to change laws, especially with Good or Evil intent) and a Lawful Evil character will usually try to apply or impose laws that work to their advantage.
The Archons of Mount Celestia (Lawful Good) work together in perfect harmony to create an idealized heaven.
The Modrons of Mechanus (Lawful Neutral) work within a rigid hierarchy whose entire purpose is to maintain the orderly functioning of their plane.
The Devils of the Nine Hells (Lawful Evil) have a hierarchy as well, but it is expected that every devil will try to advance themselves at the expense of their fellows.
In the Greyhawk campaign setting there were multiple cases of Lawful deities and their followers acting in direct opposition to each other.
The two war gods, Heironeous (Lawful Good) and his brother Hextor (Lawful Evil) are outright enemies, and their worshipers follow suit. The kingdoms of Furyondy and Nyrond were essentially governed by leaders who favored Heironeous and seceded from the Great Kingdom of Aerdy when the government of the latter became increasingly dominated by Hextor worshipers who pulled the whole empire towards Lawful Evil.
The gods Pholtus and Saint Cuthbert, who alternate between Lawful Good and Lawful Neutral depending on what edition you are playing, extremely dislike each other because both believe that they have the best notion of law. This results in their stiff-necked, legalistic worshipers getting into vicious arguments. Some Pholtus worshipers are so extreme in their conviction of their god's absolute rightness that they effectively become monotheists, either ignoring other gods or flat out denying that they exist (despite reams of evidence to the contrary). This even became a problem within Pholtus's faith, as Lawful Good and Lawful Neutral worshipers (along with some who had even slipped as far as Lawful Evil) dubbed each other "heretics" over their differing views.
In the Forgotten RealmsDungeons & Dragons setting, Tyr iswas one of the most staunchly Lawful Good deities. However, it is stated that his clerics "never enforce a law that can be shown to be unjust."
Since Tyr's clerics could be either Lawful Good or Neutral Good without losing their powers, good generally won out.
Tyr was specifically the god of Justice, not law and order. If the conflict exists, his followers would conclude the problem is with the law.
Also of note is the god Bane, who is Lawful Evil yet utterly heedless of any law other than his own. His worshipers are expected to conquer or otherwise seize all nations and bring them under Bane's control.
The Knights of Solamnia suffer from this in the Dragonlance setting, being more concerned with the rules and procedures of the Measure rather than actually upholding their Oath to defend the innocent and fight for justice. It takes Sturm Brightblade's Heroic Sacrifice for them to realize this, and then they rally to begin taking the offensive against the Dragonarmies. A later book also notes that the Knights begin going through the Measure and updating it so it allows them to better follow the Oath. However, all of this served as a plot device to emphasize the importance the saga's primary heroes as they had to overcome the enemy with little or no help from the Lawful Stupid people who should have been doing the job.
The Dungeons & DragonsBook of Exalted Deeds gives an official solution to paladins trapped in this dilemma: always err on the side of Good.
Oh, so common in the case of GMs that hate Paladins, that jokingly put the paladin, in the first seconds of the game, with the prospect: "Hey, they king is evil. What do you do? Protecting the weak is against the law and would make you Chaotic Good". In the old times of 2E it was awfully common!
Complete Scoundrel gives them an entire Prestige Class based around this concept, the Grey Guard. Although they are still forbidden from doing evil, they can play things a little looser when it comes to their vows than most paladins. Eventually they are released from their vows entirely, and can use their own judgement as to what is right.
One didn't even need to look at the Book of Exalted Deeds: the Paladin's Code of Conduct in Third Edition implied the answer by the simple fact that doing Chaotic deeds doesn't make you fall on their own (whereas Evil deeds does), you have to do it enough to cease to be Lawful Good — so long as it isn't against the (short) list of things banned by the Code of Conduct, Paladins are entirely capable of breaking the law and remaining Paladins. They just can't make a habit of it.
Camber of Culdi in the Deryni series demonstrated what the paladins _should_ be doing of course. Find a legitimate non-evil heir of the previous dynasty and install him instead. Oppose evil the lawful way, duh.
4th Edition Dungeons & Dragons clearly draws a line between the two: a Lawful Good character tends to act according to the Law, while a Good character leans towards the Good. However, the game also stresses (more than any edition before it) that alignment is a guide and not a restriction.
This situation comes up frequently in Legend of the Five Rings, as Rokugan's laws are far from just. Most famously, when the Emperor is possessed by the Big Bad Fu Leng, the entire empire is faced with the fact that the focus of their entire legal system is now basically Satan. Matsu Tsuko, leader of the Lion Clan, takes a much more tragic third option.
Warhammer 40,000 actually has this happen regularly. When you have all of Humanity under a Fanatical Church Militant with absolute power facing dire threats to its survival in a Grimdark universe where EVERYTHING is trying to kill you(or worse), harsh, inhumane, and downright Nightmarefuel Laws that trample any concept of decency, mercy or understanding is par the course.
A lighter take on this is Ciaphas Cain (Hero of the Imperium!), who could wear this as his hat instead of his usual Commissar's Cap as the official Commissariat policy seems to be to act like a Jerk Ass. Ciaphas ignores this and goes the other way around, making sure to be as friendly and lenient as possible, going so far as to become a Father to His Men. How much of this is due to a rare, true example of decency in a grimdark world or a simple desire not to get shot In the Back is uncertain though.
To give an idea about this, in one novel, a bunch of idiot Red Shirts are swarming an enemy tank and taking this thing out is absolutely crucial. The standard operating procedure for this would be to order his aide to shoot the tank, idiots be damned. Cain doesn't think about doing this for a second.
d20 Modern addresses the issue with a ranked "allegiance" system. Someone whose allegiances are "Good, Lawful" will normally choose "Good" in this dilemma, while someone who is "Lawful, Good" will choose Lawful, and one whose allegiances are "My Kingdom, Lawful, Good" will be neither if it's necessary to serve their kingdom.
The musical version of Wicked deals with the protagonist's descent into wickedness due to crimes committed by those in power. In the finale of Act One, she chooses to be "evil" and stand for what she believes in despite being branded a criminal.
Arthur of Tears to Tiara facs this problem often. He is keen on upholding the laws of his tribe (which are not particularly good and involve making dried heads out of people as solution to any problem), but is also a good person. Fortunately, other characters are willing to bend the rules to save their True Companions. By the middle of the game, Arawn manages to get him to take the good side of the debate.
Aveline and Sebastian from Dragon Age II. The biggest difference between them is Aveline usually chooses to be Good, while Sebastian is more Lawful. This is enforced by how it is easier to gain friendship points with Sebastian by following both Kirkwall and Chantry law, yet there are several scenarios in the game whereas Aveline's reaction to following the law even where it hurts people is much less predictable. In the endgame, if Hawke sides with the mages and has a high enough Friendship/Rivalry, Aveline will as well, despite technically being bound to help Meredith. Even if she wasn't convinced to help the mages as well, rather than fight Hawke she will bow out of the conflict and take the other guards with her.
Cecil has a crisis of conscience at the beginning of Final Fantasy IV based around this. He knows that what his king orders him to do is wrong, but can't yet bring himself to disobey the man that he swore his allegiance as a Dark Knight to. However, Cecil makes his decision to turn from a Lawful non-Good character to Lawful/Neutral Good after he and his longtime friend, Kain, are used by the King of Baron to massacre an entire village of innocent summoners. He then spends the next section of the game atoning for the various sins he committed while under his king's orders and ultimately earning his redemption by being transformed into a Paladin: an exemplar of the side of good.
It's even more difficult for Cecil since the king was also a father figure to him. Good thing the one who gave him those awful orders wasn't the real king who was Dead All Along.
Phoenix Wright and Miles Edgeworth are both faced with this decision, the former in Turnabout Goodbyes and the latter in Turnabout Ablaze. Both choose to reveal the truth even if they are defying their station in the justice system.
The latter shares his decision with the Yatagarasu, who took to theft when the justice system was not enough.
Edgeworth faces this again in "The Forgotten Turnabout" in the sequel to Investigations. When Kay is accused of murder and Edgeworth is warned that he will lose his prosecutor badge if he tries to help her, he chooses to do so, even getting arrested in the process.
Hammered home at the end of the fourth game is the series' ideal that Good over Lawful is always the right choice, as both the Judge and Klavier point out that the Law is always changing and adapting based on people's understanding of what is Good.
Steiner and Beatrix both have to deal with this in Final Fantasy IX when they turn against Queen Brahne after they realize her lust for power has driven her mad. Steiner in particular is extremely conflicted about this.
It takes Steiner much longer to realize the truth compared to Beatrix and it isn't until Steiner actually witnesses Brahne's lackeys, Zorn and Thorn, rip Garnet's Summon Magic out of her soul and learning that Brahne wanted Garnet dead and had her soldiers attack Beatrix (someone he had feelings for) for her betrayal that Steiner finally decides to go against the Queen and fight to protect the people he cares about.
Wallace from Fire Emblem Elibe is a Lawful Good knight, and a trusted retainer of Lord Hausen of Caelin. However, he's also the best friend of a Warrior Prince named Hassar from the Lorca Tribe, who happens to fall for Lord Hausen's daughter Madelyn... which Hausen does not approve of since Madelyn is engaged already to the marquess of Araphen. So when Madelyn elopes with Hassar and Wallace is tasked with stopping them, what does he choose to do? He prefers to let them go and allow himself to be in prision, rather than condemning them to be Star-Crossed Lovers. And considering that they're the parents of Lyndis, the main character, it all works well in the end.
Flonne from Disgaea: Hour of Darkness has to decide if she is going to be a dutiful little angel and follow the laws of Celestia or if she is going to fight for rights of demons and humans to be considered equals to angels. She settles on the latter and fights for it even at the cost of her life.
The backstory of Knights of the Old Republic II has this happen to, of all things, a droid. G0-T0, programmed to save the Republic from economic collapse without breaking any of its laws, quickly discovered the two parts of his Obstructive Code of Conduct to be mutually exclusive. This presented a Logic Bomb for him, and he responded by hiding from the Republic and assuming the identity of a human crime lord named Goto, using some... questionable means to "stabilize" the Republic. The Exile can call him on it.
Pretty much a textbook Zeroth Law Rebellion; he decides that the objective of his programming allows him to ignore the restrictions in order to preserve the Republic.
Completely averted by Paladins in the Quest for Glory series: if the choice is ever presented, their code of honor demands that they be good rather than lawful. The law can be corrupted by the powerful, but goodness is incontrovertible.
In Mass Effect, Commander Shepard (Paragon as well) is forced to go against the law many times throughout the games to pursue the greater good.
Roy of The Order of the Stick has his lawful credentials called into question during his interview in the afterlife. At the end of the interview however, it's determined that Roy can't be classified as Neutral Good because for all his failings, Roy is trying, and cannot be held to the same standards as pure forces of Lawful Good.
Likewise, Miko's decision to kill Shojo in clear contravention of her Paladin's Code and, well, laws. Shame she was completely deluded at the time...
Lord Shojo found himself at odds between keeping the Gates safe from Xykon, and adhering to Soon's Oath, which says the Sapphire Guard is only charged in guarding Soon's Gate, and cannot interfere with the other four. Shojo respects that the Sapphire Guard won't go to any of the other gates, and won't force them to violate the law, so he hires the Order of the Stick to go instead. His real alignment is unconfirmed, but Belkar thinks he's Chaotic Good.
Freefall: Florence, whose brain is hard-wired to be lawful, finds herself with no option but to break into Ecosystems Unlimited and hack their servers to prevent the release of an update that would lobotomize every robot on the planet. Of course she turns herself in afterwards, if only to make public what an EU executive attempted to do on a planet where robots make up the vast majority of the population.
Discussed by Shining Knight and a Super Soldier General Eiling in the "Patriot Act" episode of Justice League Unlimited. Sir Justin tells a story of how King Arthur had ordered him to slaughter a village of innocent peasants, but refused to, (correctly) believing that Arthur was under a spell of madness. Eiling calls him a lousy soldier and beats the crap out of him.
Examples of characters who fall from "good" status or do questionable things due to lawful constraints.
Anime and Manga
Bleach:Byakuya brought his family into disrepute by marrying a commoner then honouring her dying wish to adopt and protect her sister so he vowed before his parents grave to always uphold the law. Rukia's execution sentence confounds Byakuya; he upholds the law instead of protecting her because Confucuian values give parents higher status than wives. He is extremely grateful that Ichigo interferes with the execution and has now become an expert in committing legal Loophole Abuse to uphold what's Good.
The rationale behind the pro-registration heroes in Civil War. Apparently, it bit them really hard (more specifically with Iron Man).
In The Dusk Guard Saga Blade Sunchaser needs to choose between doing the right thing and helping her friend Hunter, or staying true to her contract and preventing him from presenting evidence against her superiors. She chooses the latter, mostly because, as a griffin, the code (and her reputation as a direct result) is quite literally her life.
In The Wheel of Time there's a minor character, Galad Damodred (half-brother of main character's love interest and of the main character), a Knight in Shining Armor of the highest caliber. His sister finds it revolting that he always does what is right. This makes Elayne seem like an idiot until she explains that Galad doesn't care who gets hurt or what the costs are in his pursuit of doing the right thing. Then she looks sane and he looks scary.
On the other hand, Galad joins the Whitecloaks, an organization that is supposed to be Lawful Good but is usually Lawful Stupid instead, and makes them live up to their ideals. After the Lord Captain Commander proves to be treacherous and dishonorable, Galad defeats him in single combat and takes his place. Later, he tells his men to set aside their prejudices about fighting alongside Aes Sedai and wolfbrothers. Or else.
In A Song of Ice and Fire, one of the three plotlines is a multi-sided war of succession. One of the candidates is Stannis Baratheon, who makes it clear that he does not want the throne. So why's he still fighting? Because he's next in line of succession, so it's his "by rights"... and because he is so focused on following the rules, he's willing to do war, black magic, even murder to put himself on a throne he doesn't want and wouldn't know what to do with if he had it. However, things become a bit more complicated when he abandons the main theatre of battle in order to save the North from a wildling invasion, "saving the kingdom to win the realm" rather than "winning the realm to save the kingdom".
And then Melisandre comes along and tells him he's The Chosen One, which doesn't help matters.
Made even worse by how the other possible prospects, his nephews and niece... are not his relatives, but born from the twincesty relationship between their mother, Stannis's sister-in-law Cersei, and her brother Jaime. And Stannis is among the first ones to find out. And then, the eldest kid King Joffrey dies messily.
Some of the sons of Fëanor wrestle with this, having sworn an oath to recover their father's Silmarils. Some of the brothers seem to have no scruples at all, but the two eldest consider forswearing their oath when it causes them to slaughter innocent people. They still end up trying to fulfill their oath every time. (The problem is that they made the mistake of swearing by Eru, the supreme god in the Tolkien verse, so only Eru can forgive them the oath. Eru never enters into his creation. It's impossible for Elves to leave it. Whoops. Lampshaded when the lesser gods reclaim the Silmarils and the sons of Fëanor consider just forgetting about the oath; they eventually decide that it's just too risky to piss off the Almighty that way.)
In the Mortal Instruments series, this is the default stance of the Clave, although some members take it all the way to Lawful Evil or just plain Lawful Stupid. Maryse Lightwood also counts, as she allows the Inquisitor to behave rather barbarically towards Jace, her adopted son, until the Inquisitor openly violates the Law and she can justify defying her.
Live Action Television
Bones: Cam references this conflict repeatedly when all of evidence points to Brennan as the murderer of the week. The rest of the team seems perfectly willing to break the rules to help Brennan, but Cam insists that she has to follow procedure and turn over the evidence even if it leads to Brennan's arrest because she believes in the system so strongly.
G(a)linda from Wicked. While her best friend Elphaba chooses to do what is right, she decides to do what is legal. She later regrets it, learning throughout the second act to Take a Third Option.
Stormwolf of the Whateley Universe is so busy being lawful that he has to overlook little things like high school kids being beaten up through bullying, and a group of girls nearly being murdered by minions of Stormwolf's archenemy.
Examples of characters who Take A Third Option
Anime and Manga
Athrun Zala is in this situation in the latter half of Gundam SEED. After successfully defeating and apparently killing his Forgotten Childhood Friend who had ended up on the other side of the war, he returns home to discover that his Arranged Marriage fiance managed to not only save his friend's life, but engineered a hijack on his behalf. Athrun is ordered to destroy or capture the friend, the fiance, and the Gundam, presenting him with a choice between My Country, Right or Wrong and Screw the Rules, I'm Doing What's Right. Eventually he decides to Take a Third Option and works to remove his country's corrupt, extremist leadership while still defending its people from attack. This turns out to align him the very people he was meant to pursue, turning the war into a Mêlée à Trois. His ex-fiance was in fact engineering a coup with the same idea, and she managed to recruit the old friend because he also felt neither side was in the right.
In Gundam 00, Celestial Being finds themselves in this situation when the Trinity team appears: ostensibly, the Trinities are on their side and part of their organization, and working for the same goals. But Celestial Being doesn't like the way the Trinities do things: they think the group takes things way too far and is overly brutal in their methods. After one of the Trinities blows up a wedding for no reason, however, Setsuna declares that the Trinities are "guilty of promoting conflict" and therefore are an acceptable target for one of Celestial Being's "Armed Interventions". After he attacks them, the rest of Celestial Being decides to support him because they were all having the same feelings he was having... he was just the only one gutsy enough to condemn their own allies.
In Batman: Year One, the police force forces Gordon to choose between playing by their rules or to be a good, but dead cop. He chooses, with Batman's help, to take over the force and make them respectable.
The Diamond Age by Neal Stephenson has an interesting example of an subverted third choice. Judge and a gentleman Fang is politely but hotly on the heels of illegal nanotechnologist Dr. X. They both enjoy strictly classic Chinese outlooks: they dress in Confucian style, havetraditional teaceremonies, and are ostensibly friends. Then Dr. X invites him onto a ship he's bought, filled with every unwanted girl baby in China that parents wanted to sell/abort (and there were a lot) and explained how he mass copied the hyper intelligent Young Ladies Primer for each. Judge Fang knows he should arrest him, but seeing the absolute good being done, says he can't because they're in international waters... to which Dr. X replies he's moved his fleet into Chinese territorial waters. Judge Fang has a breakdown and sides with Dr. X in the upcoming pro-nationalist Chinese revolution to return to the Celestial Kingdom style of government... with super nanobots!
Wedge Antilles tends strongly to favor option one, but he's lucky, skilled, Famed in Story, and connected enough that he doesn't have to just throw his position in the New Republic hierarchy away. In Dark Force Rising he freely offers Luke Skywalker the use of his X-Wing, even knowing that this should mean being court-martialled; Luke pulls strings and finds another way. In The Krytos Trap, he chooses to leave the service in order to pursue someone who can't be touched by the New Republic as it is, even though he has no chance of bringing her down without its resources... and he magnetically assembles a force which includes active members of the New Republic and uses them in an extremely successful op which is retroactively sanctioned. In Wraith Squadron he lies to protect a subordinate, but clearly states in the narration that if it comes to a trial he will not commit perjury for her - however, he doesn't think it will come to that.
And then there's Starfighters of Adumar. Sent as a diplomatic envoy to a planet that all but worships superb pilots in an attempt to get it to declare for the New Republic, Wedge is told by his liaison that in order to use his clout most effectively, he should be killing the inferior pilots flying against him, just as the Imperials are. By only flying against the locals with training lasers and paint bombs, he is being extremely disrespectful. But Wedge refuses, since he values sentient life and is unwilling to kill people who aren't his enemy. He tells the liaison that he will only start if he gets word from his superior, General Cracken, who he doubts would agree... but privately Wedge has to decide what he'll do if Cracken does agree, and in the end he decides to Screw The Rules, I'm Doing What's Right. If it comes to that. In the mean time he confronts his opposite number, an honorable Imperial who has been ordered to start bombing the world if it doesn't declare for the Empire, and talks him into a third option.
A recurring plot in Blue Bloods is Frank Reagan being forced to choose between his legal responsibilities as police commissioner and his desire to do what is morally right. He's extremely good at finding the third option that allows him to do both.
Faced with public outcry against a brutal dictator coming to New York for medical treatment, Frank has the police protect him before and during his surgery, then as soon as he's able to be moved he puts him on a plane back home, where a popular uprising has just deposed his government.
Faced with a white supremacist radio host making a live broadcast from a New York theater, Frank ensures the show can technically go on after foiling a bit of Bothering by the Book by the mayor, but puts the man's police protection inside the theater and staffs it entirely with non-white officers led by a VERY large black sergeant.
Faced with finding a way to protect a Turkish violinist in danger of an honor killing for dating an American if she returns home (the State Department's representative had wanted to grant asylum but the higher-ups vetoed it for political reasons), Frank works his contacts and gets the New York Philharmonic to hire her, and the representative is only too glad to get her a work visa.
As a classic Lawful Good alignment debate, a very common problem for all Dungeons & DragonsLawful Good characters, especially paladins, is solving such moral dilemmas. If roleplay is good (not "Me smash evil. Me bring justice") and the adventure is not a plain hack-n-slash. Interestingly enough DMs very rarely make characters have to make decisions between being chaotic and being good... A double standard, or just inherent in the nature of the two alignments?
This is often a problem caused by malicious or lazy DM's laying paladin traps who forget that in most campaign settings paladins (like clerics) follow and derive their special class powers from worshiping deities. Smart players could legitimately point out that a god outranks a mere mortal king and that if a paladin has to choose between following the commandments of the deity who grants them their paladin status in the first place or the decrees of some mortal ruler who is acting totally out of line with the god's theology then the paladin can and should feel free to ignore the mortal ruler. There are quite a few canon examples, especially in the Greyhawk and Dragonlance settings where characters are solidly Lawful Good while directly defying mortal leaders operating at cross purposes with their gods. It is the reverse situation that players have more trouble justifying.
The above probably accounts for why, in 4th Edition, they did away with Chaotic Good completely: you're either Lawful Good, and thus "bound" to honor both the tenets of good and the rules of law, or else you're Good, and you get to say "Screw the Rules, I'm Doing What's Right". Somewhat annoyingly, the system also cut out Lawful Neutral, leaving a void where those who want to say "Screw What's Right, I'm Following the Rules" would belong (beyond being "Unaligned" and declaring that's the character's behavior).
Classic example: Paladin under the control of an Evil Overlord is asked to bring back the head of the good-aligned enemy king. He does...except, after all, the terms did not specifically rule out that head being still attached to a living and very angry king with an army behind him. Guess no one can accuse that paladin of being Lawful Stupid...
The splatbooks specifically encourage this behavior from paladins, noting the loophole in their code about legitimate authority. Failing that, the Book of Exalted Deeds says that paladins being true to their ethos should always choose good over the law - the Atonement spell is there to be used for such occasions.
The option between Chaotic or Good IS possible, to note. For example, a character who has to decide between sacrificing freedoms to do the right thing or doing something morally ambiguous for self serving reasons is example how it can be done.
And then there's the third option within the third option: Establish the Lawful Good character's "law" as a strict personal code of ethics, regardless of external law.
The first Mass Effect game ends with your battle against Soverign. You can choose to either save the obstructive council for paragon points, clandestinely get rid of them for renegade points, or re-focus your energy to save innocent civilians, which nets you both. Take option 3 and the council still dies, but not out of malice.
Minmax of Goblins faced a dilemma when he encountered Kin. As an adventurer with a typical Munchkin view of the game world, he was obliged by all aspects of his personality and character-build to kill her. His comrade manages to hold him at bay and they come to the agreement that if Minmax can find just one normal thing about Kin he'll let her live. Minmax tries this but finds she is simply too alien to his world view to share any common ground. Faced with the need to kill her and no excuse of normality, Minmax chooses to create one by setting up a birthday party. After all, if Kin celebrates her birthday, he has common ground with her.
Aang, in Avatar: The Last Airbender , struggles a great deal with whether or not to kill Fire Lord Ozai at the end. He is advised by numerous people, including another airbender and Ozai's own son, to kill him, but being a Martial Pacifist, Aang is resistant to such a direct use of violence, even to save the world. In the end, he is able to remove Ozai's bending, which renders him mostly harmless.
Characters who end up swinging between options, or are hit by this dilemma twice and are inconsistent on the issue.
Anime and Manga
Negi of Mahou Sensei Negima! tends to swing back and forth depending on the situation. For example, he opposes Chao Lingshen simply because if he doesn't, he'll be turned into an ermine, and she can't give him a good enough reason to justify making that sacrifice. On most other occasions, he tends to bend or outright ignore any rules that get in the way of doing what is truly good.
That's more an issue of Gray and Gray morality. In that Negi can't decide if helping her is actually the right thing to do, his big morality dilemma is which path is right. He eventually decides that the answer is to fight her as the right thing to do. It just happens to stand on the same side with Lawful.
Suzaku of Code Geass is stuck, by his own choice, working within a corrupt system hoping to change it, and is constantly stifled in his attempts to bring about change by the powers that be. Of course, he has a hidden agenda.
Also potentially the result of Lelouch's question of what one should do if an evil cannot be defeated by just means.
The priest Carlo Belbard of Bokura no Kiseki often seems troubled by this debate. At first he gives off the impression of Lawful Neutral, following the rules of the Church regardless of personal feelings or questions of right and wrong; when other priests of the Church seem to lean towards Screw the Rules, I'm Doing What's Right, he pulls them back to the Lawful side. However, it's often clear he'd like to do what he feels is right even when it goes against Church law, particularly when it comes to helping out his Childhood Friend, Veronica. Considering he died and reincarnated along with the rest of the cast of the past, and that his reincarnation Ootomo can't seem to remember how he died, it's implied that at the very end he chose Good and went to help Veronica when her castle was invaded.
Red Witch's Galaxy Rangers fanfics play it both ways with the characters of Walsh and Zachary. Walsh traded Lawful Good for Lawful Neutral, especially when grilled about the Supertrooper Project, and eventually crosses the line when he pulls a few less than ethical stunts and finally pulls a massiveKick the Son of a Bitch by attempting to murder Senator Wheiner and vanishing. Zachary is, at heart, a believer in justice more than he is a believer of law, and when it's found out that certain elements of Earth's Government dabbled in things like staging death-matches among the Supertroopers, and government condoned genocide of Niko's homeworld due to Fantastic Racism, the good captain is justifiably pissed off, and ready to space "lawful" in order to expose and stop their crimes. Saying he goes Papa Wolf if you threaten his loved ones is like saying the ocean's a mite damp.
In The Night Angel Trilogy, Logan Gyre, now King, has to choose between sentencing his best friend to a painful death, or showing that he is willing to ignore the law when it benefits him. He chooses BOTH, publicly sentencing Kylar to death, but privately hiring a wetboy to spring him from prison before his execution. Kylar ignores the help, determined to help Logan remain just.
Happens in the episode "Beeware" in Grimm where Nick has to protect Adalind from the Mellifer queen Melissa. In the eyes of the law, Melissa is a murderer and he is a cop sworn to protect Adalind, an "innocent" woman. But in the eyes of the supernatural, Adalind is a Hexenbiest who attempted to kill Nick's aunt and Melissa is a Mellifer, an ally of Grimms. He chose the law.
In "Cat and Mouse", he chose to let Ian, the head of Resistance, go after seeing him kill a defenseless man in front of him and had Monroe dump the body away from Rosalee's store to protect Monroe and Rosalee. This time, he chose good.
The player themselves must make this choice in The Reconstruction. After you see a bunch of criminal shra (an oppressed slave class) run out of a city, you have the option of pointing the Nalian Officers in the right or wrong direction. Your answer is filtered through a chaotically good character's mouth, though, which leads to a lampshadedOut-of-Character Moment if you choose to be lawful.
Team Kimba in the Whateley Universe started out as being on the side of good but wanting to do things lawfully. Unfortunately, they didn't know the rules for the most part, but since they've learned them, they generally either find a way to handle things that won't get them in trouble, follow the rules exactly if the matter is minor, or, if it's really an emergency, say 'fuck it' and do the good thing anyway.
In Roman rhetorical schools there was a classic mock trial called "The Crime of Disobedience" based on a hypothetical case of a son refusing to kill his brother at his father's orders. Which side the student took would depend on the teacher; probably in some classes there were students who had defended both sides in different sessions.
Examples of To Be Chaotic or Good
In Western Sources, the default choice is "Chaotic" so often that it may be hard to spot the choice.
In Disney's Brave, the princess does not wish to have an arranged marriage; however, if she does not marry one of the other clans' princes, they will all be offended and the kingdom will likely fall into civil war. Valuing one's own choices over tradition and law is a Chaotic stance; preventing a civil war is obviously Good. As usual, neither the princess nor the movie angsts much over choosing Chaotic since the three princes weren't keen on the whole "contest for her hand" either..
In Casablanca, Ilsa can flee to safety with either her husband Laszlo, an important Resistance leader, or Rick, the man she really loves. Rick sends her away with Lazlo, who needs Ilsa by his side to keep up the fight, because beating the Nazis is more important than what Rick or Ilsa might want personally. One of the few sources where Good (beating the Nazis) is chosen instead of Chaos (being with your true love).