The term Deus Ex Machina is thrown around a lot in the realms of literary criticism. There’s so much discourse on the use of Deus Ex Machina in media that the meaning can get lost—even among those discussing it! To keep things straight, I’ll define what a Deus Ex Machina is before exploring its controversies: when it works and when it doesn’t.
The translation of "Deus Ex Machina" roughly means "god from the machine," and when referred to in literature, it is a plot device in which an unforeseen solution solves an impossible situation. This is typically seen in stories where something which has otherwise gone unmentioned appears to remedy a problem for the main characters. A Deus Ex Machina can come in many forms: a side character’s undisclosed intentions, an undiscovered use of magic, or the inexplicable application of a technology, the use-cases are limitless.
The use of Deus Ex Machina is criticized whenever its implementation causes a lack of fulfillment in the story’s readers. People like to reason through potential solutions to characters’ problems, and feel rewarded in being right. A Deus Ex Machina, as the inexplicable (sometimes least-likely) option, tends to rub fans the wrong way.
General rule of thumb is that if a fan couldn’t have thought of the solution with the information given, it won’t be a satisfying, well-received one. Rightfully, one of the most criticized uses of a Deus Ex Machina is when someone unexpectedly swoops in last-second to save the day (especially if they were considered to be deceased before their grand re-entrance).
Fans dislike Deus Ex Machina that are intrusive or entirely unexpected, but that doesn’t mean that all instances of one as a solution are unacceptable. The contention for many Deus Ex Machina is their implementation in relation to the importance of the event in which they occur.
For example, using a Deus Ex Machina for the ultimate resolution to the climax of a story will leave fans dissatisfied that a natural conclusion wasn’t built up to. However, if characters are in a pickle but it’s merely a "Fun and Games" adventure (see $ Save the Cat!$ ) there is much less weight given; it’s not the definitive solution to the story, just a push to get over a hiccup in the road. An excellent way to distract from the use of a Deus Ex Machina is to not have it solve anything at all, but rather present a new problem.
Let’s say your main protagonist is trapped in a corner by the bad guys, but is miraculously whisked away by a bird, only to end up in their nest of hungry chicks. Although fans couldn’t foresee the character’s means of escape, they are not asked to accept it as a "free" win—you’ve swapped one difficult situation for another, which, hopefully, has a more accountable solution.
Although the use of a Deus Ex Machina isn’t condemnable, it can be controversial, so what can you do to avoid them? Plan ahead! Don’t lead your characters to a dead end, and you won’t need a Deus Ex Machina to get them out of it. Have a solution in mind for all your major conflicts before beginning writing.
If it seems like you’re forced to implement Deus Ex Machina more than you’d prefer, read up on novel plotting structures. There’s bound to be an $ Outlining Technique$ in this article that appeals to you, and the further ahead you prepare, the less surprises your story will create for you along the way!