Has this twist ever been used in a mystery novel?

That was the one I was going to mention - great film!

There’s a British mystery novel called Waxwork where this is essentially the twist.
A novel called *The Chinese Nail Murder *does it, too.

“Has this twist ever been used in a mystery novel?”

Yep. And I haven’t even read your post yet.

The next Mickey Haller book is the same. The one where he gets the woman off on murdering the bank executive, then realizes at her “I’m not guilty! Yay!” party that she did kill him. He got her verdict by showing that unless he was looking up, there’s no way she could have delivered the blow to his head. Then he saw helium balloons at the party, remembered the helium tank in her garage, and realized that’s how she got him to look up.

There’s even a novel where you think this twist is going to happen, but instead you get a counter-twist:

[spoiler]In J. G. Ballard’s Cocaine Nights, the narrator is summoned to a dystopian Spanish resort town to defend his brother, who has been charged with a strange murder. Problem is, the suspect cheerfully admits to police, the narrator, and everybody involved that he committed the crime. During the course of the novel, and in the midst of weirder and weirder events, the narrator finds no indication his brother is guilty–or that a murder even occurred at all–but his brother refuses to change his story.

Near the end of the novel, it seems clear that his brother is taking the fall for someone else in the resort town he has gotten too close to. And when that person dies in a strange accident, the narrator…takes the fall for the “crime” exactly in the same way his brother did. A very strange turn from what you’d expect to happen, literally in the last line of the book.[/spoiler]

That’s one of Robert Van Gulik’s Judge Dee novels, I believe. The last, I think, of his original five (all titled The Chinese _____ Murders).

IIRC, that wasn’t the next Mickey Haller book.

[spoiler]The next Mickey Haller book was BRASS VERDICT, where he replaces a slain defense lawyer who’d been working a murder case. Haller eventually deduces the same game-changer his predecessor had hit upon: the gunpowder residue on his client’s hands – which proves his story was false, as he’d handled a gun, right? – in fact resulted from a not-cleaned-as-per-standard-procedure squad car back seat, which (a) said client’s hands rubbed a lot due to his behind-the-back cuffs, and which (b) the similarly-cuffed prior occupant, who’d been firing gunshots for hours, rubbed likewise first.

(Which, as it turns out, means Haller’s client didn’t need to be so damned careful about wearing gloves when shooting his wife.)[/spoiler]

Oh, and if I can jump over to comic books for a minute,

[spoiler]DAREDEVIL #184: crusading attorney Matt Murdock – who uses his super-hearing to listen for a liar’s jumpy heartbeat during interrogations – is convinced that his seemingly-guilty client must be innocent; our hero thus (a) spreads a lot of reasonable doubt around to secure a “not guilty” verdict, and (b) learns too late that he’s been duped by the steady regularity of a pacemaker, and so never suspected his client was busily framing a patsy.

Justice is done in the second trial, naturally.[/spoiler]

Heh. Sometimes I’m tempted to write a parody detective story, about an amateur detective who reads too many detective stories. He follows all the cliches and cod-logic of the genre, and get’s it completely and hopelessly wrong every single time…

But I’m guessing that’s already been done too.

You’re half-kidding, but: PARTNERS IN CRIME, by Agatha Christie.

[spoiler]“I can’t help but feel that we are more or less amateurs at this business,” our hero says, upon setting up shop in a “detective agency” that’s really just a front company for sinister interests; his employer doesn’t actually care whether he solves any crimes, but the neophyte lays out his strategy all the same: “These books are detective stories by the leading masters of the art. I intend to try different styles, and compare results.”

And so he breaks out a violin and attempts the Sherlock scan of how his client du jour arrived; she patiently derails him by explaining that, no, she’s carrying said bus-ticket stub because the neighbor boy collects 'em; he then tries the Blind Detective Whose Eyes Cannot Deceive Him schtick, and – promptly bangs into a chair, fails to tell people apart by their distinctive handshakes, gives an entirely incorrect description of the restaurant patron at the next table, and et cetera.

And so he tries the Father Brown approach, and – is busily tracking the gambling countess when the authorities arrest the real thief. “It wasn’t a Father Brown problem,” someone points out to him. “One needs a certain atmosphere from the start. One must be doing something quite ordinary, and then bizarre things begin to happen. That’s the idea.” He later moves on to trying to crack a perfect alibi the way Inspector French would; unfortunately, after a lot of “Why are all the things that are so easy and simple in books so difficult in real life?” and “It is a pity that real life is so different from fiction” – well, someone else solves it, by coming up with “rather a funny idea. Not at all like anything I have ever read in detective stories. As a matter of fact, it is an idea you put into my head … Not the ingenious sort of flaw that Inspector French would have detected.”

He tries being Poirot to sleuth a locked-room mystery. He tries being The Old Man In The Corner to solve a murder by just reading the newspaper accounts. He tries being Thorndyke, the medico-legal detective, to handle a jewel heist with clever photography. He tries being one of the Okewood brothers and – promptly gets kidnapped by the folks who were ostensibly hiring him. (“An error in diagnosis,” he remarks; “I labelled this adventure wrong. It’s not a Clubfoot story. It’s a Bull Dog Drummond”.)

That last bit ends about as well as the time he takes on a counterfeiting ring for Scotland Yard – by ostentatiously going through the motions of a famous story, which prompts the crook to counter the obvious ploy and gloat thereafter that “I know that story you mentioned. Heard it when I was a little boy.”

(I’m just getting warmed up, here; Christie goes on like this for hundreds of pages…)[/spoiler]

Though they are parodies, the crimes are solved.

A better example are all the stories about Schlock Homes in the parody series by Robert L. Fish, Schlock Homes: The Complete Bagel Street Saga. Homes applies Holmesian methods and get every case wildly wrong. The brilliance of the parodies is that the reader can always understand the actual crime that Homes burbles nonsense about and each has a resolution as satisfactory as any of the real Holmes stories.

And the puns. My god, the puns.

In Sue Grafton’s book

I is for Innocent, this happened - Kinsey Millhone is hired to find evidence against the guy who they think committed the murder, he get her thinking that he has a good alibi, she starts looking into other suspects…and it turns out the alibi was really not good and it was him all along. Even the book’s title gets you thinking it wasn’t him.

There is another movie that does this, whose name I can’t remember now. It’s set in the Louisiana bayou, and it’s about this poor black guy who is obviously being railroaded by the racist white cops, blah blah blah. The crusading lawyer investigates, and gets the guy acquitted, only to discover that his client really was guilty all along.

The TV show The Good Wife has used variants of this more than once.

They also used the reliable old twist on it, where the person who is guilty gets off but later on is convicted for something he or she didn’t do, in karmic justice.

If it was Florida – complete with gators! – you may be thinking of Just Cause, where Sean Connery exonerates the guy who immediately turns out to have been guilty.

An episode of the TV series Probe, “Metamorphic Anthropoidic Prototype Over You,” not only used that twist, but added a couple of other twists on top of it.

The murder suspect, Josephine, was

an intelligent ape trained to communicate in sign language.

Scientific genius detective Austin James (Parker Stevenson) investigated the case, only to discover that

Josephine really did commit the murder. But from watching TV detective shows, she came to the conclusion that the most obvious suspect is never convicted, so she deliberately left clues to her guilt, knowing that they would convince Austin that she was being framed.

I’m not going to spoiler a 20 year old TV show.

In one episode of Quantum Leap, Sam leaps into the body of someone about to be executed in the electric chair. He has 48 hours to prove his innocence, which is what he assumes he has been sent to do. After going through all the evidence looking for something which would save him, he finally realizes that he’s actually guilty.

(Just as he is about to be killed he realizes that the actual reason for him being there was to confess that he worked alone, thus saving his co-accused from being executed.)

One more Agatha Christie,

The Murder at the Vicarage.

The blustering, unpopular old Colonel Protheroe is found shot in the vicar’s study, after the vicar was called out of the village by a faked phone call. Everybody suspects either the man’s wife or the young artist she’s having an affair with. Pretending to each suspect the other did it, they both turn themselves in to the police. Er, Anne pretends to suspect Lawrence and tells the police that she, Anne, did it. Lawrence pretends to suspect Anne and tells the police that he, Lawrence, did it. This is so obviously the act of a worried pair of lovers that they must not know who did it! Naturally, they were in on it together.

Can I throw in a film noir from the '50s?

[spoiler]Fritz Lang’s Beyond A Reasonable Doubt, where a newspaper publisher wants to prove a point about the death penalty – so when a showgirl’s murder goes unsolved, a young writer looking to marry said boss’ daughter agrees to play along; they frame him with purely circumstantial evidence, carefully getting exculpatory film at each step; he’s soon arrested and put on trial, and found guilty and put on death row, and OH MY GOD the boss died in a fiery car accident that incinerated all the proof that they faked the whole thing!

So we know to ignore all the evidence against him, but nobody else does; can the aforementioned love interest clear our hero’s name to secure him a pardon? Well, yeah, but she probably shouldn’t; the twist ending is that he was the killer and so adored the idea of dramatically establishing his innocence.

Recently remade with Jesse Metcalfe and Amber Tamblyn in the Dana Andrews and Joan Fontaine roles, which was probably a mistake.[/spoiler]

I think that’s it. I was remembering the wrong state with gators :slight_smile: