The worst possible ending to your story is having your character wake up in bed and discover that it was all a dream. Yes, The Wizard of Oz ends this way, and yes, it’s a classic, but you won’t get away with it, but that’s okay because you didn’t want to anyway.
The second-worst possible ending to your story is a deus ex machina. That’s Latin for “god in the machine,” and it’s a plot device where God, fate, luck, or some other external force resolves a plot problem that the protagonist can’t fix. It’s what writers pull out of their asses after they’ve written themselves into a corner, where the hero can’t possibly defeat the villain without divine intervention or a stroke of random good luck. I see this sort of thing in manuscripts far more often than I would like.
Sir Wobblebottom stood alone on the open plain, sword in hand, his rain-lashed face a mask of defiance, as Lord Chester’s army, nearly ten thousand strong, crested the hill and prepared to cut him to ribbons.
Then all of a sudden, an earthquake erupted and opened up a gaping chasm, swallowing Lord Chester’s army in a single gulp and saving the day.
Yeah, don’t do that.
Ideally, you will almost paint your characters into a corner. Readers love wondering how in the world your hero will get out of this one. But you have to come up with a satisfying answer, something that’s entirely believable, adheres to the rules of the fictional world you’ve constructed, adheres to the rules of logic that govern all worlds (except, granted, for Borges’s Tlön), and is based on your character’s known abilities and skills. You can’t just have the earth open up and swallow the enemy whole. You can’t just have God come down from the heavens and smite the villain with a lightning bolt at the last possible second. Well, you can, but as sure as my birth name is Michael James Totten, your readers are not going to like it.
This is hardly a new plot cheat. Deus ex machina is Latin, after all, which tells us right there that it goes back at least to the time of the Roman Empire, but it actually goes back even farther to ancient Greece. In ancient Greek plays, writers frequently created huge conflicts between characters that were essentially unresolvable. There was simply no way the protagonist was going to triumph over the antagonist, so one or more of the mythical Greek gods appeared to resolve everything.
Remember that these were stage plays rather than novels or films, so an actor portraying one of the Greek gods had to appear on that stage alongside the actors playing humans. And since the Greek gods could fly, the actor playing the Greek god was lowered onto the stage by a rope attached to a crane. The Greek god in the story was the deus, and the crane was the machina, the machine. Hence the phrase deus ex machina.
Greek audiences didn’t mind this plot device, partly because they were used to it, but Aristotle famously didn’t care for it much, and modern audiences hate it and everything like it. They hate it because it makes the writer seem lazy. Since the writer can’t think of a way to resolve the plot, God (or fate or luck or random chance) intervenes to tidy things up.
Here’s what Aristotle had to say about it in the Poetics, written more than 2,400 years ago:
As in the structure of the plot, so too in the portraiture of character, the poet should always aim either at the necessary or the probable. Thus a person of a given character should speak or act in a given way, by the rule either of necessity or of probability; just as this event should follow that by necessary or probable sequence. It is therefore evident that the unraveling of the plot, no less than the complication, must arise out of the plot itself, it must not be brought about by the Deus ex Machina.
This doesn’t just apply to the ending, by the way. You can (but you’d better not) have a smaller deus ex machina anywhere in your story. The villain trips and falls while pursuing the hero. A cop car randomly drives by and takes the would-be carjacker off the street. A lieutenant in the villain’s goon squad is suddenly diagnosed with a brain tumor. You get the idea.
There’s a less famous flip side to this equation called the diabolus ex machina, or devil in the machine, where the hero’s life is suddenly made more difficult by fate or bad luck or some random event rather than by something the antagonist does. Luke Skywalker loses both arms in an X-wing crash and can no longer fight with a light saber. Jack Reacher accidentally puts glue in his eyes instead of eye drops and renders himself blind for life and confined to an assisted living facility. FBI agent Clarice Starling, after defeating serial killers Buffalo Bill and Hannibal Lecter, is maimed by falling airplane parts and has to ride a desk now.
Readers will hurl your book across the room if you pull a stunt like that, not just at the end of your novel but at any point in your story. I’ve never encountered one as ludicrous as the made-up examples above, but little ones are as common as typos.
Sure, random crap like this happens in real life, but fiction isn’t real life. Readers want your protagonist to win and to win based their own experience, skills, tools, wits, and powers. And if the antagonist prevails, which is okay too if you want that kind of ending, make sure that he, she, or it wins using their own experience, skills, tools, wits, and powers, not only at the end of your story but during every chapter and scene.
A deus ex machina makes everything that happened before it feel pointless. If an unexpected event or character is just going to resolve everything anyway, what was the purpose of all that previous buildup? If you’ve done a good job until now, readers will be immersed in the story in a state of suspended disbelief, but you’ll shatter that illusion with anything even adjacent to a deus ex machina, even a little one in the middle of the story. Oh look, there just happens to be a convenient gun lying there on the sidewalk, so now our hero can shoot the serial killer before becoming his next victim!
If you can’t figure out how to get your protagonist out of a jam, stop writing and think. Noodle it for days if you have to, and write a different scene in the meantime. There is no getting around this. And if you figure something out at the last minute that you haven’t already established—ooh, what if there’s a suitcase full of pistols and money stashed in the closet?—you’ll need to go back and place that suitcase there rather than pulling it out of your hat at the last possible second.
Remember Chekhov’s rifle? It’s the narrative principle that says every story element must be necessary. If you draw readers’ attention to the fact that there’s a rifle hanging over the fireplace, somebody needs to fire that rifle at some point in the story. This principle works both ways. If a character pulls a rifle off the wall above the fireplace at some point in the story, readers need to know that rifle is there long before anyone uses it. Otherwise, it will appear as lazily convenient as your hero randomly finding a gun on the sidewalk or the villain slipping and breaking his neck in the bathtub.
* * *
Those who believe there’s no such thing as a coincidence are wired to believe conspiracy theories. Of course there’s such a thing as a coincidence. The first time my wife and I visited Paris, she bumped into an old classmate from Cal Arts who was also there on vacation. It didn’t happen for a reason. It wasn’t planned. They just both happened to be there at the same time. The only universe where this sort of thing never happens in a universe governed by an all-powerful force that makes sure it never happens.
It may not be realistic, but the universe of your book needs to be that kind of universe. You are the all-powerful force tasked with making sure coincidences never happen, not in the story anyway. Because a coincidence that drives the plot forward is the evil twin of the deus ex machina.
You don’t want your readers to sarcastically think to themselves, Isn’t that convenient? Not only will it destroy their belief in the story, they’ll be pointing the finger at you. Yeah, you. They’ll notice what you’re doing, they won’t like it, and they’ll judge you for it. They might continue reading if you’re doing everything else right, but they’ll be in a sour mood for a while, and if you keep doing it, they’re out of there. Look, it’s mathematically possible that all the atmospheric molecules in the villain’s bedroom will randomly move in the same direction at the same time, cross to the other side of the room, create a vacuum, and cause the bad guy to explode, but don’t you dare put that in a story that isn’t a comedy.
Your hero randomly stumbles onto the elusive villain at the Jacksonville mall on Sunday afternoon after failing to track him down for weeks? Isn’t that convenient? Or the guy who carjacked Janey two weeks ago and got away just randomly happens to be the same guy who shows up at her house to fix her leaky sink when she calls a plumber? Isn’t that convenient? An FBI safehouse randomly goes up in flames due to faulty wiring, forcing the feds to move the witness to a new location? Isn’t that convenient?
It’s okay to start a story with a coincidence. If it’s the inciting incident, fine. I don’t love it, but no one will accuse you of deploying a deus ex machina to extract yourself from a plot corner you’ve painted yourself into because you don’t have a plot yet. You’re on page 1. Start with a coincidence on page 1, and hardly anyone will even consciously notice you’ve done it.
Just don’t end with a coincidence, and don’t move the plot forward with one. Your homicide detective needs to solve the case. He can’t just randomly catch the serial killer in the act of attempting to murder his fifth victim. Katie’s stalker ex-husband has to use his wits or at least cleverness to find her after she changes her name and goes on the run. He can’t just randomly bump into her when he goes on an internet date with a stranger. I’ve seen manuscripts where the author drives the plot forward with one coincidental happenstance after another. If you follow a one-in-a-million coincidence with a second one-in-a-million coincidence, that means the likelihood of this plot actually happening in the real world is one in a million times a million, or one in a trillion. If you do it three times, we’re talking about one in a quintillion, which looks like this: 1,000,000,000,000,000,000,000. If the odds that your plot could actually happen in the real world are only 1 in 1,000,000,000,000,000,000,000, not a soul will believe it.
*
If you enjoyed this and learned something useful, you can read so much more in my book Write, Edit, Publish: What Every Writer Needs to Know but Only an Editor Will Tell You. I’m also a professional developmental editor, line editor, copy editor, and publishing consultant, and you can hire me to help you with your book. Reach out and tell me what you’re working on, send me your questions, ask for a free sample edit, or just say hi.
