To err is human, and for the most part, murderers are as human as the next guy. Sometimes mistakes are made and the victim of a murder turns out to not be the intended target of the one who committed it. In Cop Shows, especially Police Procedurals, this can cause investigators to pursue Red Herrings and make other errors as the mistaken victim is assumed (at least, at first) to be the killer's intended target.
For criminals, hitting the wrong guy means that their intended victim might be alerted that someone's after them. Even worse, the wrong guy might be a person they actually care about.
Occasionally inverted when the killer kills the right person, but purposefully makes things look like Murder by Mistake. Especially brazen killers make themselves appear to be the intended target, thus taking themselves off of the police's radar entirely.
In Real Life, this is common enough for the rule of "transferred intent": intent follows the bullet, so that the intent to kill someone makes your killing anyone intentional. The Other Wiki has more here
Compare to Accidental Murder, where the dead people are accidental collateral damage rather than dead by misaimed intention, and I Didn't Mean to Kill Him, where the killer did mean to do something to the victim.
As a Death Trope, all Spoilers will be unmarked ahead. Beware.
In Last Exile, Sofia's orders an attack on Maestro Delphine's flagship. Just as the ship is destroyed, she learns that her Love Interest Alex Rowe was on board and had just moments before killed Delphine himself.
In FAKE, Ryo's parents were killed by the mafia when they were mistaken for the targeted drug runners for said mafia after taking the wrong bag at the airport.
This is what created the Age of Apocalypse alternate reality in X-Men. The time-traveling mutant Legion attempted to assassinate Magneto, but missed and killed Charles Xavier instead. This caused Apocalypse to awaken some twenty years earlier than he did in the main Marvel universe. With neither the X-Men nor any of the other Marvel superhero teams (Fantastic Four, the Avengers, etc.) having been formed yet at that time, there was no one equipped to oppose Apocalypse and prevent him from taking over the world.
Jubilation Lee's parents were mistakenly killed by hitmen who had actually been sent after their neighbors, who were also named Lee.
Retconned, the above was Jubilee's inference in an issue of Wolverine. A later issue of Generation X reveals that the murder of her parents was quite deliberate, with the grandfather of one of Jubilee's current classmates being responsible.
In one issue of Jonah Hex, a killer tries to shoot Jonah through a curtained saloon window. He instead shoots the Soiled Dove who is prancing about the room in Jonah's hat.
In the Marvel G.I. Joe series, this is why the Hard Master was killed. He was teaching Snake-Eyes a technique called the "Cloak of the Chameleon" while imitating the intended target: Snake-Eyes himself.
In Legally Blonde, the murderer wanted to kill her step-mother, and planned to kill her as she stepped in to their home. So when the door opened, the murderer took a shot. It ended up being her father.
In The Cats Meow, Thomas H. Ince is shot by William Hearst from behind because he was wearing a bowler hat and Hearst mistook him for Charlie Chaplin, his intended target.
In the film version of The Firm, DeVasher shoots and kills the Nordic Man thinking that he was Mitch McDeere, through a closed door after seeing a silhouette of the Nordic Man carrying McDeere's briefcase.
The surviving characters in Lighthouse devise a trap involving molotov cocktails to kill the psychotic Rook. They manage to torch a guy from earlier part of the film who chose the wrongest possible moment to return to the lighthouse.
Laurie seemingly kills Michael by chopping his head off with an axe in Halloween H20: Twenty Years Later, only for the next sequel to reveal that Laurie actually killed a paramedic whose larynx Michael had crushed before knocking him out and switching clothes with him.
In the remake Patty tries to blast Michael with a shotgun during his escape from Smith's Grove. Michael grabs an earlier downed guard and uses him as a shield.
In The Kennel Murder Case by S. S. Van Dine, one of the victims is killed because the killer mistook him for his brother (the intended victim).
In the Nero Wolfe novel Please Pass The Guilt by Rex Stout, a person is killed by a trap bomb, but it isn't clear for whom the bomb was intended.
In both the Hercule Poirot mystery Peril at End House and the Miss Marple mystery The Mirror Crack'd from Side to Side, the murderer convinces nearly everyone that this was what happened, when in fact, the person who died was indeed the target, and the apparent intended victim was the murderer.
Miss Marple encountered this again At Bertram's Hotel, where the murderer claims her victim was accidentally shot while defending her from an unknown assailant.
A variant occurs in another Marple novel, They Do It with Mirrors. It's evident that Christian Gulbrandsen was killed intentionally, but the murder set it up to make it look like Gulbrandsen's murder was only incidental to his real target. Actually, Gulbrandsen was the primary target and all other actions were just to cover it up. Differs from the above examples in that the murderer is someone other than the apparent intended target.
Played with in The ABC Murders. The final murder does not fit the killer's pattern, making it appear that the murderer made a mistake. In reality, the final murder was unimportant to the pattern, and the killer merely chose his victim randomly.
Similarly played with in Three Act Tragedy. The first murder, which appears to be a mistake, turns out to be a "dress rehearsal" in which the killer didn't have a specific target in mind to begin with.
A variation in A Murder Is Announced is more like an inversion of Suicide By Mistake, where the gunman who appeared to have made an attempt on Miss Blacklock's life before accidentally killing himself turns out to have been murdered by her.
In the short story "Triangle at Rhodes", the victim was poisoned by her husband, who dressed it up as a misaimed attempt on his own life by the husband of his accomplice (and lover), hoping to marry her after getting him hanged.
Agatha Christie also played this one straight at least once. In Sparkling Cyanide, the killers poisoned their intended victim's glass of wine at a restaurant, but then everyone at the table got up to dance and returned to the wrong chairs, so someone else got the poisoned glass.
In Curtain, Hastings turns around a bookcase, inadvertently swapping Mrs Franklin's coffee cup with a poisoned cup she had prepared for her husband.
In A Caribbean Mystery, the murderer killed the wrong victim after misidentifying her in the dark.
In John Morgan Wilson's Spider Season, the murderer tries to frighten Justice by putting a brown recluse spider in the mailbox. Instead, s/he accidentally kills Fred, one of Justice's elderly landlords.
The Inspector Morse novel Death Is Now My Neighbour. The first victim dies because the killer meant to bump off the guy next door, but entered the wrong house.
In the Jack Ryan novel The Bear And The Dragon, the action is kicked off when a relatively high-profile pimp is killed within view of the RVS chairman in a very public way. Because they were both in the same model and color car, the question for half the plot becomes whether or not the pimp was the intended target. He wasn't, the Chinese hired a former Spetznaz guy to kill the chairman to cause disorder in the Russian government.
In Point Of Impact, which was the basis for the Mark Wahlberg film Shooter, the assassination is aimed for the President and, due to prevailing cross-winds, simply missed and hit the wrong target. Or so everyone believes, but the bullet hit who it was supposed to.
In "Someone in the Room" by Elizabeth Fancett, a woman alone in her house after her husband left her is horrified when she hears someone breaking into her bedroom. She reaches for the bedside lamp and beats them to death with it - only to discover she's just killed her young son.
In The Professional Killers by J.T. Edson, Deputy Tom Cord is killed because he matched the description the hitmen were given of their target (old trenchcoat and hat) and got off the train the target was supposed to be arriving on. It is later discovered that target had changed his mind and not caught that train at all.
Live Action TV
This happens very often in Law & Order. Often, the intended victim will just be wounded, while an innocent bystander is killed.
Subverted in the Law & Order: Special Victims Unit episode "Raw", where a sniper shoots several children playing in their school's yard. One of the murdered children is the authentic target; the sniper shot the others intentionally to muddy the waters and make it seem like a random crime.
In Homicide: Life on the Street, the episode Every Mother's Son features a fourteen year old killer who shot another kid in his ear at a bowling alley, killing him. As it turns out he confused the kid he shot for another kid who threatened to 'get' him. What makes the situation worse is that the kid is so smug and arrogant that he thinks he'll be acquitted because he shot the wrong kid, and equates the whole thing to someone accidentally being killed in car accident.
The X-Files: In the episode "The Blessing Way", Dana Scully's sister Melissa is killed by mistake when Luis Cardinal and Alex Krycek, thinking that Melissa is Dana, shoot her in the head as she enters her sister's apartment.
In Heroes, Isaac is trying to shoot an invisible Peter — he sees movement out of the corner of his eye, and shoots, sending a bullet straight through Simone's heart. What makes it even worse is that both Isaac and Peter are in love with her. Leads to Died in Your Arms Tonight with two pairs of arms.
In the Columbo episode "A Bird In The Hand", a football team owner's gardener is mistakenly killed by a car-bomb. The killer is caught after Columbo watches a video tape of the explosion and notices the team owner's nephew wince as the gardener gets into the rigged car.
In the Queen of Swords episode "Vengeance," a local noble is killed, causing everyone to think that an ongoing feud is escalating. The assassin was actually aiming at the doctor standing next to the nobleman, and missed.
An episode of Foyle's War had a man who accidentally killed someone with a similar name to the depraved RAF officer who impregnated his daughter, then drove her to suicide.
In the season 5 finale of Highlander: The Series, Duncan MacLeod is hunting around an abandoned racetrack in the dark, looking for a demon who is taunting him by prancing around wearing the faces of student Richie Ryan and conquered enemies Kronos and James Horton, who all appear at the same time and trap him between them. They all disappear, Duncan whips around...and in his confusion beheads the real Richie, who was there even though everyone told him not to go.
The third episode of the French series Empreintes Criminelles starts with a scientist being shot in a brothel, from an unknown source. It turns out an Asshole Victim was being killed next room, and one of the bullets overpenetrated through the guy and the wall.
The pilot of Starsky and Hutch is set up as this, with a hit on Starsky mistakenly taking out an innocent couple (due to their mutual possession of a fairly distinctive car); it develops that they actually were the intended victims, with Starsky set up as a fake target to misdirect attention from the real motive.
And the first victim in "A Sacred Trust". As Barnaby points out, one nun in glasses looks much like another in the dark.
And the first victim in "The Maid in Splendour", who was in the wrong place and wrong time in the wrong clothes.
Rizzoli & Isles: The first victim in "Rebel Without a Pause" was hit by a ricochet of a shot intended for someone else.
JAG: In the Pilot Movie, Lieutenant Carter accidently threw Lt. Arruti overboard in anger because she wore a jacket with Lt. Cassie Puller's callsign Lobo on the back. Cassie had beaten Carter in weightlifting three times and he couldn't stand being beaten by a woman.
In a particularly nasty example, a woman on CSI: Crime Scene Investigation, grief-stricken by news her teenaged daughter had been killed in a drunk-driving accident, slipped into the hospital and murdered the young woman who'd been driving the crashed vehicle. Turns out it was her own daughter whom she'd killed, as the two near-identical girls had both suffered disfiguring facial injuries, had swapped outfits and driving duties that evening, and her daughter had borrowed her friend's fake ID to buy booze.
Ellery Queen: Happens to the first victim in "The Adventure of the Sinister Scenario". The killer then tries again and gets it right
Subversion: Monk thinks, at least until the end of the second season, that Trudy was killed because of this, believing himself to be the intended target. In "Mr. Monk Goes to Jail," it's revealed that Trudy was always the intended target and not him.
Another subversion: In "Mr. Monk and the Secret Santa," Captain Stottlemeyer receives a gift (apparently from a body shop) in the form of a bottle of port, which happens to have been poisoned. At the police station's Christmas party, he is to give a Secret Santa present to fellow detective Terry Chasen, but when he's unable to find the hair trimmer he planned to give, police officer Alice Westergren suggests he give Terry the bottle of port (especially since Stottlemeyer hates port). Terry drinks it, the poison hits him, and he dies. At first, it looks like someone tried to kill Stottlemeyer as retaliation, possibly an ex-con named Frank Prager, whose brother Michael was killed by Stottlemeyer during a bank robbery. However, Monk then proves that Alice is Terry's ex-girlfriend, and she killed him because he decided to return to his wife.
In "Mr. Monk Takes a Punch," an attempt on Ray Regis's life that begins the episode goes like this: the bomber plants his device in a heavy punching bag, assuming that Regis will be the first to take a swing at it. However, when Regis does arrive, the only contact he makes with the bag is tapping the top of it. An innocent washed-up drunken ex-boxer named Eddie, however, ends up accidentally killing himself by taking a demonstrative swing at the bomb-rigged bag.
In Hamlet, the title Prince stabs Polonius through a curtain, thinking him to be his Evil Uncle, Claudius, who he has sworn vengeance again.
Later, Queen Gertrude drinks from a poisoned goblet of wine that Claudius had intended for Hamlet.
Magic: The Gathering has a card called Goblin Assassin which may cause any player (including its owner) to sacrifice a creature any time a Goblin comes into play. Its flavour text strongly hints at the reason for this.
The more victims he kills, the more likely he is to get the right one.
Ace Attorney involves this as well. Acro wanted to kill Regina for not realizing how she was responsible for his brother's coma. He has a plan to drop a heavy weight once she arrived a certain spot. However, he could not see who arrived at the spot due to his condition and placement, and ended up killing Regina's father, a man who he looked up to very much.
In the Star Fox series, the Nintendo Power comics had Andross, the main Big Bad of the series, plan to get rid of James McCloud, father of Fox McCloud as he was in love with Vixy Reinard McCloud, Fox's mother and James' wife. However, she didn't love him back... at all (it was implied he was more of a Stalker with a Crush). So, he decided to kill James with a car bomb. Unfortunately, on the day he planted it, James let Vixy use his car to get to work, as hers was broken down, and she was killed in the following explosion.
In one of the endings to Nine Hours, Nine Persons, Nine Doors it is revealed that Ace's prosopagnosia results in him murdering Nijisaki, the decoy, instead of Snake. Granted, judging by the murder of the 9th man partly being motivated by him knowing too much, he would have murdered Nijisaki, an accomplice in the Nonary Project, anyway.
Near the end of V2, Bryan Calvert shoots at who he believes to be principal murderess Mariavel Varella. He shoots Whitney Acosta by mistake instead. And in V4, Ilario Fiametta kills innocent Etain Brennan when trying to shoot Kris Hartmann.
Both Dr Horrible and Captain Hammer of Dr. Horrible's Sing-Along Blog. Horrible brought his Death Ray to kill Hammer but backed off at the last minute. Hammer took advantage of this stole his now broken gun and shot it at Horrible. The subsequent explosion send schrapnels flying at Penny Hammer's girlfriend and Billy's crush.
Spider-Man: The Animated Series: In "The Return of the Green Goblin", Spidey believed Norman did this when he threw a bomb at Peter and Harry's rented apartment. In fact, the Green Goblin believed he had killed Spidey until our hero showed up to fight him. Spider-Man unmasks the Goblin only to learn Harry took in Norman's footsteps.
The very first attempt on the life of Archduke Franz Ferdinand of Austria involved the would-be assassin throwing a hand grenade at the Archduke's car and missing. The explosion injured several innocent bystanders instead. Ironically, the Archduke was finally assassinated while he was on the way to visit several of the casualties of the explosion.
The Archduke's wife, Duchess Sophie, was shot by mistake as well. She was sitting next to her husband in the back seat of their open touring car, across from General Potoriek, the military governor of Bosnia, another intended target of the assassination conspiracy. Gavrilo Princip testified that he was so shocked by the presence of the lady right in the path of his intended victims that he didn't even take aim when he fired, but shot with his eyes closed. He expressed great remorse over Sophie's death, stating that he had never intended to deprive the Archduke and Duchess' children of their mother. (Additionally, some accounts of the murder have Princip's arm being grabbed by a plainclothes police officer who was standing next to him, thus deflecting the bullet that was meant for General Potoriek so that it hit the Duchess instead.)