It was described by one television executive as the worst idea for a show he had ever heard. Now Breaking Bad, the everyday story of a middle-aged chemistry teacher who is diagnosed with cancer and becomes a gun-toting drugs kingpin, will soon end with the most eagerly-awaited finale on the small screen since The Sopranos.

The second half of the concluding fifth series began on American cable channel AMC last week, with UK viewers able to watch it 24 hours later on streaming video service, Netflix.

It is a consequence of the drama's difficult subject matter, perhaps, that beyond an early glimpse on Channel 5's digital channel 5 USA, the Emmy award-winning Breaking Bad joined that band of lauded American shows, from Seinfeld to The Wire, buried by British broadcasters. Box sets – and Netflix – put that right.

"I am sad that the show is over but I've not had a bad night's sleep worrying that we were ending at the wrong time," says its creator, Vince Gilligan, who admitted he cried while writing the final episode.

Gilligan says he knew by the end of season four – when crystal meth maker Walter White, played by Bryan Cranston, overcomes his arch-enemy Gustavo Fring – that the end was nigh.

"As much as anything it was realising that Walter White had reached a high point and how long can anyone stay at the top?" says Gilligan. "That is always a good question, in fiction and in real life."

Breaking Bad's final eight-part run began with 5.9 million viewers in the US, a huge audience for a cable channel. This was four times the number who watched its first episode five years ago, and nearly double the figure (3 million) for the most recent series finale.

Gilligan confesses surprise at the residual affection which has built up among viewers for White, even as the lies – and the bodycount – have spiralled.

"I have kind of lost sympathy for Walt along the way," says Gilligan. "I find it interesting, this sociological phenomenon, that people still root for Walt. Perhaps it says something about the nature of fiction, that viewers have to identify on some level with the protagonist of the show, or maybe he's just interesting because he is good at what he does. Viewers respond to people who are good at their job, even when they are bad."

That the empathy endures – and the show works at all – is down to Cranston, the former Malcolm in the Middle star (and Seinfeld's dentist) who first worked with Gilligan on a 1998 episode of The X Files.

"We needed an actor to play a character who was very dark and nasty but at the end of the hour you had to feel sorry for him," remembers Gilligan, who worked in various capacities on seven series of The X Files, alongside its creator, Chris Carter.

"We had a real hard time casting it. [Cranston] was a complete stranger to me but he just nailed it. About 18 months later he began working on another TV show, Malcolm in the Middle, and it was only at that point that I realised he could be very funny, as well as being this really serious, intense dramatic actor. It made me want to work with him even more."

Without giving away any spoilers about Breaking Bad's closing episodes, Gilligan has promised: "As the movie title goes, there will be blood."

"I have surprised myself at how much story there was left to tell and how quickly we tell it," he said in a preview of its final run. "You need to really settle down on the couch and pay close attention because it's going to come at you fast and furious in the final eight episodes."

Unlike in The Sopranos, there is "not much in the way of ambiguity with this ending … I feel like this ending represents on some level, however small, something of a victory for Walter White. Read into that what you will."

Breaking Bad set out its stall with the extraordinary three-minute opening to its pilot episode, broadcast on AMC in 2008. White, wearing nothing but a gas mask and his underpants, crashes a motor home with two bodies in the back (a third person is unconscious in the passenger seat) and records an emotional farewell to his family before pulling a gun on the approaching emergency services.

The pre-credits sequence to each episode – often timeshifted, occasionally surreal – became a signature part of the show, and also one of the most labour-intensive.

"It's like hooking a fish," says Gilligan. "You have got to set the hook early, especially in a situation where people's thumbs are hovering over the remote control. We would sometimes spend as much as a week trying to get the teaser right; it needs to be pored over very closely and given great attention to make sure we get it right."

Gilligan and his six-strong team of writers would work out the storylines between them before assigning a particular writer to script an entire episode. "We sit around the writers' room for hours on end, staring up at a corkboard saying 'what happens next?'" he says. "We then write specific scenes on index cards and pin them to the corkboard."

Gilligan says each episode is organised in the same way, a discipline he learned from working with Carter. "If you look closely at Breaking Bad and any given episode of The X Files, you will realise the structure is exactly the same. The cold opening, the three- to five-minute teaser, will be followed by four acts of the story. That's the structure I took lock, stock and barrel from The X Files."

Gilligan worked on the science fiction drama after submitting a script which became the episode Soft Light in the second series. He also scripted the 1993 romantic comedy Wilder Napalm, which failed to set the world alight, and Home Fries, which he wrote in college and was made into a film in 1998, with Drew Barrymore and Luke Wilson.

Gilligan had the idea for Breaking Bad when a friend joked, after The X Files finished in 2002, that they should follow the example of a man who had put a meth lab in the back of a Winnebago and driven around the US south-west. His pitch: "We're going to take Mr. Chips, and we're going to turn him into Scarface."

Made by Sony Pictures Television, the show has been sold to more than 170 territories and the company is currently making a Latin American adaptation in Colombia, called Metastasis.

Fans who will be left bereft by its imminent end can console themselves with the prospect of a spin-off prequel featuring lawyer Saul ("Better call Saul!") Goodman, played by Bob Odenkirk, on which Gilligan is working with one of the show's writers, Peter Gould.

"I think we could have a lot of fun with his character," says Gilligan. "Peter and I are hard at work trying to figure out exactly what a Saul Goodman spin-off would look like. We can't promise it will happen but we love the idea very much.

"Saul started off as comic relief and he excelled in that capacity but he is actually pretty good at his job. He's not particularly moral or upright but if you are a criminal, you'd want him in your corner."

It remains to be seen where it might end up, although with newcomers such as Netflix pumping millions of dollars into original production such as the Emmy-nominated House of Cards, the TV landscape has changed dramatically in the five years since Breaking Bad started.

"Netflix is a wonderful company, I love [its chief content officer] Ted Sarandos, they are doing great shows," says Gilligan. "Having said that, six or seven years ago when AMC was about to go on air with Mad Men and then Breaking Bad, they were the new game in town and they remain a wonderful place to do business."

"Every few years there's a new outlet – [US cable and satellite station] WGN is now gearing up to do original scripted programming," he adds.

"That's a wonderful development, Netflix included. It's counter to the way the film business is going, where everything is conglomerating and aggregating and the big companies are gobbling up the little ones. It's wonderful and somewhat counterintuitive – TV outlets for programming seem to be popping up like mushrooms."

Vince Gilligan is hosting a masterclass at the Guardian Edinburgh International Television Festival on 22 August. More details at geitf.co.uk