As “Dexter” reaches its final episode on Showtime on Sunday night, the question is, will he go or will he go?

That is, will the serial killer Dexter Morgan head off to happy retirement in Argentina with his family, or end up in some kind of hell, whether above or below ground? Does the man we’ve watched plunging long knives into helpless victims for eight seasons require punishment, no matter how charming and sometimes heroic he’s been?

The proper fate of the seemingly irredeemable hero is a hot topic in prime time right now, with “Breaking Bad” playing out a similar scenario in its fifth and final season, which ends on Sept. 29. Of course, history tells us that these accountings can be ambiguous: Tony Soprano frozen in his booth at the diner, Vic Mackey consigned to a desk job but reaching for his gun.

Those finales (of “The Sopranos” and “The Shield”) suggested that dramatic values and the feelings of fans outweigh moral considerations when it comes to ending popular, long-running cable series, and that a good hero is hard to kill off, no matter how many people he’s killed himself.

The endgame has a different importance, though, in “Dexter,” a more stylized and fanciful show with an even more single-minded focus on its protagonist’s psyche. The question of Dexter’s fate was baked into the gothic premise: a psychopath trained by his adoptive father, a police officer, to be an honorable killer, dispatching only those who needed killing. And the show’s mix of film noir and fairy tale seemed to leave open the possibility of redemption, and even a happy ending.

The result is that, for at least two and perhaps three seasons, it has felt as if we’d been in a long process of preparation for Sunday night, with story lines whose primary purpose was to push Dexter ever closer to an edge that kept receding as the show’s ratings remained strong by premium-cable standards. (Seasons 7 and 8 have been the show’s highest-rated, averaging 2.1 million to 2.2 million viewers.)

It has been a frustrating ride for those of us who loved the show’s early seasons, when it achieved an unusually happy balance of interesting long arc (Dexter’s progress toward humanity and his intense relationship with his foster sister, the dedicated cop Deb) and snappy, short-term storytelling (his season-length battles with other serial killers and his dealings with his droll colleagues in the homicide squad of the Miami police).

In addition to gore, suspense and heartbreak — including the authentically shocking murder of Dexter’s wife at the end of Season 4 — “Dexter” was also marked by its easygoing, sunny vibe and its undercurrent of jabbing workplace humor. As the rest of the cable drama landscape grew increasingly grim and heavy-handed, it was a welcome respite, like picking up a fast and punchy Charles Willeford novel (“Miami Blues,” say) after slogging through a well-reviewed pretentious literary mystery.

Even as the story has lost some of its steam in recent seasons, it’s been worth staying around because of the cast, beginning with Michael C. Hall and Jennifer Carpenter, as Dexter and Deb, and including excellent supporting performances by David Zayas, C. S. Lee and Desmond Harrington, as cops who never quite figure out that their blood-spatter analyst is murdering people under their noses.

Ms. Carpenter, the fire to Mr. Hall’s ice in the show’s central relationship, has suffered the most from the need to keep the show going: last season, Deb killed an innocent (a superior officer, no less) to protect her foster brother, and has since been an uneasy partner in his plots. It’s a development that has strained credulity, even in the hothouse context of “Dexter,” and the waters were further muddied by her admission to a therapist that she was attracted to her brother. It probably would have been better if none of these things had happened, which is to say that it would have been better if the show had wrapped up by Season 5 or 6.

But here we are in Season 8, and the good news is that the pace has picked up recently, as you’d expect. The Icelandic actor Darri Ingolfsson, stepping into the shoes of past guest stars like John Lithgow and Jimmy Smits, has made the Dexter doppelgänger Oliver Saxon a chilling, worthy adversary. Viewers who are up-to-date (spoiler ahead) will know that Dexter’s decision to walk away from a kill — readying himself mentally for that idyllic new life in Argentina — has had potentially tragic results.

I’ll admit here that I’ve seen the finale and know the answers to my initial questions. I won’t give anything away, except that I expect that it will be controversial — prepare for a Twitter storm around 9:45 p.m. on Sunday — and that while I didn’t buy everything in the episode, I bought the ending. You may or may not think that Dexter’s final resting place is the one he deserves. But it works.

A version of this article appears in print on September 20, 2013, on page C1 of the New York edition with the headline: Bad Guy as Hero: Happy Ending?. Order Reprints|Today's Paper|Subscribe