Boardwalk Empire airs the last episode of its fifth and final season this Sunday on HBO and creator Terence Winter has made sure the prohibition drama will end on his own terms.

Check Out Scenes From The 'Boardwalk Empire' Series Finale 

"The first rule of show business is get off the stage while people still want more," explained Winter during an interview with Rolling Stone on Wednesday.

It seems the writer had much of the series mapped out from the very beginning, and decisions that came as shocks to fans were actually things he'd thought out pretty far in advance. For example, Jimmy Darmody's (Michael Pitt) death at the end of Season 2 was something Winter had been planning since the very beginning.

'Boardwalk' Empire Cast Dishes On 'The Call' 

"I always knew Nucky [Steve Buscemi] would kill Jimmy," admitted Winter. "He is the guy who tells Nucky in the pilot that you can't be half a gangster, and at some point you knew Nucky would cross that line by killing the very same person who gave him that advice."

Not only did Jimmy's death make for compelling television, Winter considered it inevitable.

"If it didn't happen, I would call bulls---," he continued. "If this were a network show, I guarantee that at the last minute Jimmy would have gotten some reprieve."

Fortunately for Winter, he mostly had free reign when devising his prohibition drama and made the decisions he knew were right for the narrative instead of what might be considered more popular choices.

"I'd feel like I was missing something if I didn't explore the greater scope of what was happening," explained Winter in relation to his process. "Boardwalk Empire lent itself to that. Prohibition tied into World War I, with veterans coming into the trafficking world. Prohibition led to gangsters. Nucky being in Atlantic City led you to nightclubs. They were all organically interwoven."

As for the finale this week, Winter knows fans will be watching closely. "The stakes are high," he said, "And we've been conscious of that as we've plotted out the finale year, and the finale. We're confident about it."

Boardwalk Empire continues on HBO with the finale for its fifth and final season Sunday, Oct. 26 at 9 p.m. ET/PT.