This is the entire conflict between the X-Men and their nemesis, Magneto. The X-Men wholeheartedly believe in this ideal, as taught by their leader, Professor Xavier. Magneto, on the other hand, believes that the only way to battle oppression is to rise up and conquer them. Various points of media will show either as being "right", Depending on the Writer.
Explicit in Judge Dredd, where vigilante justice is a more heavily enforced crime than burglary and drug dealing. Yes, this includes "lethally resisting someone trying to kill you", or "breaking and entering private properly while trying to escape," but only if you're caught. Hilariously lampshaded when Rob Schneider's character in the first movie is told he didn't have to hijack the food-bot, he could have gone out the window.
Fergee: From twenty stories!? That would be suicide!
In Con Air, the (sympathetic) main character is put in prison for accidentally killing someone in defense of his wife, but you get the impression he got a raw deal, and the judge says that as an inactive soldier, he should have been more careful.
The judge completely ignores the fact that, as a US Army Ranger, the guy is specifically trained to kill. The guy was defending himself and his wife from five bullies. It's inevitable that the training would take over.
An especially jarring plot point from The Butterfly Effect has Evan get sent to prison when he accidentally kills Tommy in self-defense. Mind you, everyone knows Tommy is a violent psycho and there were a dozen witnesses to testify that Tommy was trying to kill Evan.
In Escape from Alcatraz, English is a veteran inmate in Alcatraz prison in 1960. He tells Frank Morris his story how he wound up in there. He was harassed by two men, who tried to attack him with knives. English killed them both. The reason why he got two life sentences, back-to-back? The two men were white, and he was black.
In Harry Potter and the Order of the Phoenix, Harry risks breaking The Masquerade by using magic to protect his cousin and himself against Dementors, and is put on trial for this. In this case, the government in question is waging a propaganda war against Harry, and is twisting the law in order to punish him as much as possible and make him look like a delinquent. And then it turns out that one of their particularly nasty members is secretly responsible for the attack in the first place.
In Hoot, Roy punches Dana in the face while being choked and is subsequently punished.
Honor Harrington takes some flak with her political opponents for shooting a man when she knew his gun was empty, because he had emptied it in her general direction when her back was turned, in direct violation of the rules of the duel the two were engaged in. Under those rules, the supervisor was required to kill the offending party, so her opponent would have died anyway.
Season two of Dexter has his girlfriend's abusive ex-husband force his way into her house. Her children are sleeping nearby, and she's afraid of what will happen to them if she puts up a fight, so she lures him into her bedroom, and smacks him down with the Emergency Bat she keeps under her bed. Next thing you know, the ex-husband is filing assault charges against her, and she's in danger of losing her kids. Fortunately, her current boyfriend just happens to be a psychopathic Serial Killer Killer...
In the Star Trek: Enterprise episode "Lone Star", killing a human, even in self-defense, is a hanging crime for a Skagerran.
Bob Marley "I Shot The Sheriff". (But he didn't shoot the Deputy.)
In Max Payne 3, a mob boss wants to kill Max for killing his son, when said son was going to kill Max unprovoked.
The iOS Choose Your Own Adventure called Heroes Rise has the Player Character's parents be famous superheroes who were attacked by an assassin while accepting their award in public. While attempting to subdue her, they accidentally kill her. The judge sentences them both to life in prison with no possibility of parole and doesn't even grant them visitation rights. Oh, and all their money is given to the assassin's daughter. It's made clear that this was a political move on the judge's part, as he was running for mayor at the time. However, it's not clear why a murder trial wasn't a trial by jury and why the jury didn't side with the city's favorite superheroes instead of an assassin who was trying to kill them. There should've been an appeal to a higher court (i.e. where said judge couldn't do anything). On the other hand, the ending implies that the judge-turned-mayor may have had other reasons to put away the player's parents.
Generally, in video games where combat is not consistently necessary, typically in a Wide Open Sandbox with police patrolling throughout the game-world, if they're not programmed to go after the player for everything they will react to witnessing violence by assuming the first person they see holding a weapon or otherwise attacking someone is responsible for it and begin trying to arrest/neutralize them. If the player isn't careful this typically results in the police joining random aggressive NPCs in attempting to kill the player for little reason, but if they are careful they can exploit this to remove those troublesome NPCs by attacking them once and then luring them towards the police.
In GTA, it's worse - the gangs can use you for target practice and the police isn't the least interested. But just kill one of those lil' Ballas vermins...
There's a subversion in Danganronpa: The first culprit killed someone who tried to kill him first, making it a crime of self-defense...except as a classmate points out, the first culprit actually had another option; when the would-be murderer locked herself in the shower, the actual murderer could have simply left the room and escaped. Instead, he went out of his way to retrieve his toolbox from his room, then go back to his victim's room just to break down the shower door and stab her.
In a strip of Ozy and Millie, their regular Jerk Jock bully, Jeremy, keeps pushing Millie into a pool of mud, knocking her over every time she tries to get up. Finally, she snaps and socks him in the face... at which point a teacher immediately spots her, and hauls her into the principal's office for starting a fight. (The injustice inherent in the school system is a frequently visited theme).
What makes this even worse, the same teacher, upon being questioned by Millie's mom, pretty much admitted she saw the whole thing and only punished Millie because it was easier than dealing with the REAL bully. Quoth Millie's mom: "Did it hurt having your soul extracted?"
In Muertitos, the school has a zero tolerance policy. After a girl bully attacks him, Honeo is suspended because instead of lying limp, he flailed around and could have hit someone, but the bully got off scot free because her dad is rich and regularly makes donations to the school. You can see the strip here.
In Leftover Soup Jamie was mugged and shot but he grabbed the guy's gun and pistol-whipped him with it then called the police. But because the mugger was technically a minor (albeit a lot larger than the scrawny Jamie) the police took his side when he pressed charges for assault, and the only fingerprints on the (stolen) gun were Jamie's, and the press painted it as a hate crime because the supposedly beaten 17-year old was black. Jamie only got off because his accuser OD'd on PCP and killed himself.