When a player loses the game, the game immediately checks a set of cleanup actions defined in CR 800.4. Among these: all spells and abilities controlled by that player that are on the stack are exiled. This means the spell never gets the chance to resolve, and any targets or effects it would have caused simply do not happen.
This is distinct from a spell being countered — the spell is removed from the stack as a state-based-like consequence of the player leaving the game, not via the counter mechanic. The opponent does not 'dodge' it through any special interaction; it simply disappears along with the departing player.
It's important to note that ownership matters here in multiplayer contexts (CR 800.4a): spells and permanents the losing player owns are exiled, while permanents they control but don't own are returned to their owners. On the stack specifically, the losing player's spells and abilities are exiled regardless of ownership nuances, because a spell on the stack is both owned and controlled by the caster.
Example: Alice casts Fireball targeting Bob's creature. Before the Fireball resolves, Bob plays an effect that causes Alice to lose the game. Alice's Fireball is immediately exiled from the stack and never resolves — Bob's creature is safe.
This rule also applies in multiplayer (CR 800.4): if a player in a four-player game loses mid-stack, all their pending spells vanish, and the game continues among the remaining players with a now-cleaned-up stack.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.