'Game of Thrones' creator George R.R. Martin almost quit writing for real estate

Kit Harington (Jon Snow) and Emilia Clarke (Daenerys Targaryen) star in Season 8 of HBO's "Game of Thrones".
Source: HBO

On Sunday, the much-anticipated eighth, and final, season of HBO's massively popular series "Game of Thrones" will finally debut.

Over the previous seven seasons, millions of viewers have become obsessed with the fantasy world filled with dragons, knights and frozen zombies — all of which was created by author George R.R. Martin. As the author of the five books (so far) that form the basis of the popular HBO series, Martin has reportedly pulled in millions of dollars in royalties from book sales and licensing rights to his work.

But, for the 70-year-old Martin — who first started publishing short stories and novels in 1971 — an early setback nearly derailed his writing career and could have prevented him from ever creating the fantasy world of "Game of Thrones."

George R.R. Martin
Steve Jennings | WireImage

"The greatest setback I ever faced was the failure of my fourth novel, 'The Armageddon Rag,'" Martin told The Wall Street Journal in 2014.

Prior to its release in 1983, Martin said, he had been "a hot young writer for quite a long time." At that point, Martin had already racked up three Hugo Awards (handed out each year to the best science fiction or fantasy works) for his previous short stories and novellas.

"Each novel I wrote got a bigger advance and more publicity and more awards nominations than the one before … until 'The Armageddon Rag,'" Martin said.

The novel, which combines elements of fantasy and a murder mystery, got Martin "the biggest advance I'd gotten" from his publishing house (Poseidon Press) and garnered solid reviews from critics. But it didn't sell.

"My publishers were certain it would be my first best-seller, and nobody bought it," he said.

"Instead of taking me to the next level, it almost destroyed my career," Martin told Publisher's Weekly.

The commercial backlash from Martin's failed fourth novel was so bad, "suddenly, no one wanted my books anymore," he told WSJ.

For Martin, the inability to sell his future novels forced him to reconsider his career and look for other ways to make money.

"There was a period there, when I couldn't sell my fifth novel, where I was looking to sell my house, and I took one of those courses in buying real estate for no money down in my desperation [to make money]," Martin said.

But, in an ironic twist that could have come straight out of a novel itself, Martin says he was saved from possible financial ruin when "The Armageddon Rag" actually opened the door for Martin's second career as a Hollywood writer. Producer Philip DeGuere Jr. was one of the few fans of the failed novel and optioned it for a movie in the mid-1980s, Martin told the Financial Times.

The Mountain landed his "Game of Thrones" role on Facebook Messenger

The movie never came to fruition, but DeGuere Jr. ended up hiring Martin as a writer for a television reboot of the series "The Twilight Zone," and Martin went on to write five episodes of the sci-fi series, starting in 1986. From there, Martin continued getting steady writing work in Hollywood.

"Oddly enough, the same book that essentially crippled my career as a novelist started my career in Hollywood," Martin said.

His television work and the failure of his fourth novel kept Martin from writing another full-length novel form more than decade. But in 1996, Martin published "A Game of Thrones," which became the first book in the best-selling series called "A Song of Ice and Fire." In 2011, HBO premiered its show based on that fantasy series, turning Martin into a millionaire and a household name for fantasy fiction fans around the world.

Still, the major setback that Martin experienced in the 1980s taught him to never take success for granted: "You're only as hot as your last success," Martin said.

Don't Miss: This 'Game of Thrones' star landed the role of a lifetime via a cold-message on Facebook

Like this story? Subscribe to CNBC Make It on YouTube!

HBO bets big on "Game of Thrones" marketing ahead of final season