Ichigo lives by this mantra. He breaks the rules of Soul Society to rescue Rukia and breaks them again to rescue Orihime. Lampshaded in the manga a couple of times. Orihime gives him the confidence to rescue Rukia by pointing out he's the type to do what's right and sort the consequences out later and, when Ichigo discovers Byakuya was stuck between upholding the rules and doing what's right and chose to uphold the rules, he tells Byakuya that he should have done what's right. He earns Byakuya's Undying Loyalty as a result.
Ukitake and Kyouraku destroy the device that'll execute Rukia, knowing that it's breaking Soul Society law and will trigger a fight to the death between themselves and their mentor and commander, Yamamoto. They do so anyway, but are fortunately reconciled with Yamamoto when the truth about Aizen comes out.
Yamamoto himself finally finds a reason to break the laws of Soul Society. In the Lost Agent arc, the only way to save Ichigo from the Arc Villain is to restore his shinigami powers, which will break the same Soul Society law that Rukia broke in Chapter 1. Yamamoto concludes that the debt the Gotei 13 owes Ichigo is so great it would destroy everything they stand for to not honour it, and therefore gives the order to save Ichigo.
Akon, even when under direct orders from Mayuri, has been known to break the rules if he believes it's the right thing to do. When the Gotei 13 is being slaughtered by the Vandenreich, he disobeys orders to contact Ichigo for help, and later on reveals he illegally has Mayuri's activities under surveillance. Given Mayuri's status as a For Science!Ax-CrazyMad Scientist, this might make Akon one of the smartest people in the entire manga.
Masaki Kurosaki believed that she should always help people in trouble even if Quincy laws prohibited her from getting involved. And Ryuuken Ishida, who had lectured her on obeying the rules, secretly breaks the rules himself by both letting her go and sneaking after her without her knowledge to ensure she has back-up should she require it.
This trope is also used a lot by L, who often does things that are against the law, such as placing cameras and bugs in people's houses and imprisoning people without a trial, in his efforts to catch Kira.
In episode 1 of the God Eater anime, as soon as Lenka realizes there's no one to send to defend the Aragami invasion, he run out of the room, steals his God Arc, and runs out to battle.
Vandread: At the end of the Second Stage, Hibiki launches into an epic speech in defiance of the planetary governments to rally the people of Tarak and Mejale into standing up and stopping the Harvest fleet.
In Soul Eater, during a mission to retrieve an Ancient Artifact from a magnetic vortex, Professor Stein (who was in charge of the mission) and his weapon partner Marie were supossed to be the only ones who will enter the vortex, since it was too dangerous, while the students of the DWMA will stay outside in order to stop enemy interference. However, the students later disregarded the orders to save the teachers (the first group to enter) and their fellow schoolmates (after the teachers came out but not the first group), and the latter group was being threatened with getting expelled if they don't follow the orders.
In Sakura Wars: The Movie, after Maria goes missing while investigating Douglas-Stewart, Sakura and everyone else left in the Imperial Flower Division decide to "do what we can while we can and go back to the Imperial Theater, take it back, and get back our Kobu Kais and save Tokyo", despite being placed on indefinite standby.
Sakura: Hey, I know why not?
Everybody Else: Huh?
Sakura: Do what we can while we can. I don't want to live with regrets in my heart. Come on! Let's do this together.
Iris: Let's do it!
Leni: Let's do it!
Kanna: Let's go for it!
Korhan: I'm with you!
Sumire: I suppose that we must.
Captain Harlock turns to space piracy because of the corruption of Earth's government, but still fights for what he believes in and is willing to defend the Earth if need be.
Code Geass has Suzaku, the pilot of a Humongous Mecha, punch the mech's designer in the face when he didn't let him go out and fight. Now, whether you consider his actions justice-driven or revenge-driven decides whether this belongs here. Particularly interesting in that Suzaku is usually the inverse of this trope, fighting for The Empire even though he knows it's corrupt and wicked.
He also defied the officer that was in charge of his unit during the first episode (back when he was ordered to kill Lelouch and C.C.).
Averted in Suzaku of the Counterattack in that Genbu wasn't waiting for other countries' support/reinforcements, but planning on selling out Japanese officials in exchange for wealth and/or social authority.
The entire story is about Lelouch becoming an outlaw and going against the established order to fight for his ideals.
Tengen Toppa Gurren Lagann subverts this. Rossiu sticks Simon in jail to execute him in order to appease a mob, but despite the hot-blooded past of the show, Simon sits down and takes it. The viewer expects to see some awesome scene where Simon breaks out, but nothing happens. Later on, he is freed in a quasi-legal way.
Although in imprisoning Simon in the first place Rossiu was preforming a really dark version of this. Considering that Rossiu actually had no real criminal charges against Simon besides a bogus "War Crimes" charge that was meant to quell an angry mob. Made even worse when Rossiu spends the two weeks after Simons imprisonment making a huge mess of things and almost winds up wiping out the human race as a result.
This was played MUCH straighter when a bunch of members of Team Dai-Guren ignore Rossiu's orders to destroy Gurren-Laggan and previous orders to destroy the Teams Gunmen. And when Yoko later breaks Simon out of prison and he and the Gunmen that were supposed to be scrapped wind up saving humanity and mopping up the huge mess Rossiu made.
On the other hand, they frequently say "screw the rules... of physics, I'm doing what's right."
Trinity Blood: In the episode Overcount I. The Belfry of Downfall, Cardinal Caterina Sforza breaks Vatican protocol in seeking to stop a weapon that could destroy all of Rome. As a result, she is placed under house arrest, and it is hinted that that she might have been executed. However, she is cleared when the weapon is used.
The Vision of Escaflowne: The Knight Caeli Allen Schezar abandons his country of Asturia in order to stop the Zaibach Empire's attack on Duchy of Freid, as well as plunging all of Gaea into war. It turns out, Zaibach's goal to recreate the power of Atlantis would have destroyed all of Gaea.
Negi in Mahou Sensei Negima!, when the teachers get in the way. He tries following the rules, hell, he's even working to make sure there are still rules to follow. Eventually, he just decides "to hell with it, they're not going to listen". Oddly enough, however, he's not actually sure that he is doing the right thing, just that the teachers are wrong.
Markarov: Do what you think is right, that's the way of the Fairy Tail mages!!
Naruto Uzumaki in Naruto; this is just the way he is throughout the series.
Also Hatake Kakashi and his father Sakumo, who became an outcast after choosing his comrades' lives over his mission and committed suicide afterwards. Kakashi himself took on this approach to the rules after his best friend's death.
Kakashi: Those who break laws are scum. And those who abandon their friends to follow the law... they're lower than scum!
In Monster, Tenma's boss reassigns him from operating on a young boy with a bullet in his head to operating on the mayor instead. Knowing that he is the only one who can pull off the first surgery successfully, he proceeds with it against direct orders. Morally laudable, but it turned out to be The Wrong Right Thing.
Prince Wilfred of Private Prince invokes this many times, specially when he plans to renounce his royalty status and marry into his girlfriend Miyako's Japanese family, if that's the only way for him to stay with her and escape the Royal Family.
Pulled by Renzaburo in Wicked City, who goes to rescue his partner Makie despite his boss's orders.
Happened several times in Rosario + Vampire, most notably when Mizore's mother helps the heroes rescue Mizore from her Arranged Marriage despite said marriage being legal and traditional, explaining that she knew Mizore would be unhappy because her arranged groom was an asshole.
An example in very early One Piece: After Luffy and Zoro defeated a very unpopular marine captain, who was only in charge because everyone was terrified of him, the Marines allowed Coby to join them despite knowing he was affiliated with pirates as a cabin boy, and allowed Luffy and Zoro to go free without problems, even saluting them as the two left. The new commander said because they had broken the law they would all have no food for a week. None of the marines appeared to mind at all.
And before that, Jinbe refused to answer the World Government's call to fight against the Whitebeard Pirates, because his homeland owed a great debt to Whitebeard. This led directly to his meeting and befriending both Luffy and his older brother Ace, and defecting to aid Luffy and the Whitebeard in their attempt to save Ace from execution. Really, this is what Jinbe's all about. He'll do what's right, regardless of the cost to himself.
Further shown in the Fishman Island arc, when Jinbe breaks Fishman Island's laws to give blood to Luffy. He lampshades this by effectively saying "I'm a pirate, I don't have to obey the law."
In the Dressrosa arc, Fujitora, one of the new admirals after the Time Skip, does this in a very, very Wham Episode: when Luffy defeats Donquixote Doflamingo, the man starts up a broadcast to the local islands, ensuring that the rest of the world finds out, too, and informs them that Doflamingo had been defeated BY LUFFY, and then offers his apologies on behalf of the Marines and World Government for allowing Doflamingo's tyranny to go on for the past decade. The very livid Fleet Admiral contacts Fujitora, and the latter responds basically like this.
Moroha is told in Seiken Tsukai No World Break that the hydra currently attacking is too much for even the Strikers, the elite unit at school. He's told it would take well over a hundred men to bring that beast down, and says it's not worth risking their lives to do it. Despite that warning, Moroha goes in anyway, because his friends Ranjou and Urushibara are trapped by the monster. Fortunately he manages to help them after Urushibara helps him to unlock a new power.
The Namekian Fusion technique is somewhat considered this in Dragon Ball Z, as Nail and Kami have mentioned that the technique is stated to be forbidden amonst the Namekian populace. However, considering the cases in which the Fusions were made to fight against (Frieza and Cell,) it still fits this Trope.
In Mobile Suit Gundam SEED, Kira is a little disgusted at the fact that Lacus is being treated as both a prisoner and a bargaining chip onboard the Archangel and works with his friends to get her out. Shinn does this to Stella in Mobile Suit Gundam SEED Destiny, but it doesn't work out as well as the previous example.
Jirou of Concrete Revolutio: Choujin Gensou will go beyond the call of his duty as a government agent to do what's right (in his definition of "justice"). This may be the reason why he leaves the Superhuman Bureau at some point in the near future.
Ebisu in Noragami doesn't care for the law or common opinion. He just wants to help people and humanity. He takes in plenty of Nora (who are often despised by gods and shinki) and treats them kindly and in turn, they are loyal to him. He also attempts to control Ayakashi to manipulate them away from the living at great cost to his health.