The Ace Attorney games like this trope. At least one victim in each game was pretty explicitly Not A Nice Person—many of them are criminals themselves.
In Phoenix Wright: Ace Attorney (the first game):
One of Redd White's blackmail victims who were Driven to Suicide was a corrupt politician who was embezzling money.
The victim in the third case turned out to have been intentionally trying to frame your client, Will Powers, one of the nicest characters in the series, out of jealousy, by drugging him and stealing his costume. The real killer acted in self-defense, though they wouldn't have needed to if they hadn't been blackmailing him in the first place.
The fourth case's victim was a defense attorney who sought to get not guilty verdicts even if it meant harm to his clients, and was killed by one of said clients who had been genuinely innocent but had his entire life destroyed as a result of the false insanity plea.
In Phoenix Wright: Ace Attorney: Justice for All (the second game):
The second case's victim, Turner Grey, was a real Dr. Jerk killed by a former employee who alleged he had drugged her, causing her to crash her car and kill her little sister. (Whether he actually did drug her is somewhat unclear, but being one of the few victims met before their demise, his jerkass persona is well-evident.)
Juan Corrida of the fourth case initially seems like a nice guy, but it becomes increasingly evident that the feud between himself and Matt Engarde was an ugly reflection on both of them, and often wound up with other people in the crosshairs: most notably, when Juan found out his fiancee Celeste had once been an item with Matt, he called off their wedding and Celeste committed suicide. Her protege, Adrian Andrews, blamed them both for her mentor's death.
In Phoenix Wright: Ace Attorney: Trials and Tribulations:
The first case's victim, Doug Swallow, is a subversion: Although he's Dahlia's ex and Phoenix refers to him as a "stuck-up British wannabe", in truth he was trying to give Phoenix a very important warning about his girlfriend.
In the fourth case, the victim is Valerie Hawthorne, a police officer who helped engineer a fake murder/kidnapping that ended with her and her sister in possession of a small fortune stolen from their father, and their co-conspirator sentenced to death for a crime that had not been committed. The twist is that she was killed because had she finally decided to come clean about everything, and the murderer stood to lose everything from her attack of conscience. Sad case all around.
In Apollo Justice: Ace Attorney:
The first case's victim, Shadi Smith, is a bit of a complicated case, as his real identity (and the motive of his murderer) isn't clear until the very end. However, even before that it's made known that he was trying to rig a game of cards against the defendant, and when the plan failed he clocked his co-conspirator over the head with a bottle of grape juice.
The victim of the second case, Pal Meraktis, not only dealt with the criminal underworld and covered up a botched operation on Wocky, but he tried to kill Alita Tiala. He failed quite miserably, and she shot him instead.
The third case initially appears to play this straight; Oliver Deacon/Colin Devorae is thought to have been an escaped felon who betrayed his accomplices in Lance Amano's kidnapping for the money, but it turns out that Lance threatened his daughter's safety to force him to falsely kidnap him, and that his previous "crimes" were Taking the Heat for Ernest Amano.
One of the victims of the fifth case, Manny Coachen, was a man who was heavily involved in an international smuggling ring and counterfeiting operation that almost destroyed another country's economy, and had gotten away with at least one murder in his lifetime.
In Investigations 2:
The victim in the second case is actually the culprit from the first case—and if later revelations make his death sort of tragic in retrospect, he was still a guy that murdered his innocent co-worker out of envy and ambition.
In the third case, the victim was an infamously greedy sculptor apparently Only in It for the Money, who forced his own son to kidnap the son of his former partner so that he could have an easier time betraying and blackmailing him. The blackmailee opted to kill him instead. In the same case the killer himself also became a victim, albeit nonfatally, and he was a guy who only valued his son as a taste-tester and left him behind in an Orphanage of Fear when he fled the country after the murder.
Then, in the final case, the victim (who had been met way back in the first case) turns out to have been much more assholish than had been initially suspected—he was in fact a former body double for the head of state who had arranged the man's assassination, taken his place, fabricated his own kidnapping to defraud the country of millions and killed or tried to kill anyone who could have exposed his real identity. By comparison the game's actual Big Bad, who arranged his murder, comes off as downright sympathetic, and possibly would have been seen as justified if he hadn't tried to pin the murder on a thirteen-year-old boy.
Dual Destinies is notable among the games for having absolutely no Asshole Victims whatsoever. Every murder victim in the game, whether a case-focused or in the backstory, was a genuinely decent person (although Bobby Fulbright can only be inferred from the assumption that the Phantom's impersonation was accurate).
Shinji Matou in Fate/stay night, Heaven's Feel route. Considering that this is the guy who has been raping his sister Sakura for years, treats his Servant Rider like a dog even when she remains unflinchingly loyal to him, and tried to rape Rin when she was tied up and unable to resist, no one is exactly shedding any tears for him when he's stabbed through the chest by the very sister he was again attempting to rape, even if this proves to be her Start of Darkness.
And if you wanted his anime counterpart dead too, don't worry. That happens too.
The victim in the Murder MysteryVisual NovelJisei was working with her company to steal information from a rival corporation, but decided to doublecross her employer in favor of a third party that offered her more money.
Rina Mamiya from Higurashi no Naku Koro ni is this in one arc. She tries to kill Rena, so Rena kills her. Even if she was a Jerk AssGold Digger, it's horrifying when Rena kills her in the manga. She's crying, begging, bleeding, in pain... In any other media, her death is very quick though.
Onryu Sonozaki in the Cotton Drifting and Eye Opening chapters by Shion. Subverted in later arcs.
Sayaka Maizono in Dangan Ronpa is this trope, as she invited Leon to her room as an attempt to murder him, which backfired. She had also set up the protagonist to take the fall for her. Leon doesn't come out of this smelling like roses either, as he picked up Sayaka's framejob from there, even though wrongly accusing Naegi of murder meant that everyone but Leon would be killed. At the end, one character points out that hedid have time to stop and think when the victim (who was having second thoughts) retreated, meaning that it wasn't entirely done in self-defense - but pursued and killed them anyway.
The sequel has Hiyoko Saionji, a massive brat who treated her classmates like garbage (especially Tsumiki) and had a habit of abusing small animals. However, even though Tsumiki was the one who killed her, this turns out not to be the case; Hiyoko wasn't targeted, she just walked in on a murder already underway and had to be silenced.
From "Twilight Syndrome", a game inside the video game that was based on actual events in the characters' lives, the victim, Kuzuryuu's sister, had been bullying D-ko(Koizumi), expecting to get away with it because of her powerful parents. D-ko's close friend, E-ko(Satou) confronted the victim, and in a fit of rage, strangled her until she fell unconsciousness, then killed her in order to prevent any possible problems that might arise if she came to.