You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Mr Key told the book's author - senior New Zealand Herald and former parliamentary journalist John Roughan - that he had been worried about losing, and "losing feels like failure and I don't kinda like failure".
Roughan writes that Mr Key's frustration began with the "Teagate" saga surrounding the taping of his conversation with Act candidate John Banks at a Newmarket cafe during the 2011 election campaign.
For the first time, the Prime Minister let a trivial incident gnaw away at him for months. His problems continued to mount during 2012 - the most difficult year he has faced during the 12 years the former investment banker and money trader has been in Parliament.
Mr Key prided himself on his ability to focus on the things that really mattered, but was overwhelmed by side issues which seemed to take on a life of their own - be it Kim Dotcom's $50,000 donation to Mr Banks, extra pokies at SkyCity, the Novopay mess or the backdown on reducing class sizes.
Roughan writes that at the end of 2012, Mr Key had a "quiet discussion" with his wife, Bronagh, during which they "kicked the tyres" after his four years of running the country and asked themselves, "Are we still committed to all this?"
Mr Key's strong belief and confidence in the progress the country was making under his prime ministership prevailed. "Sure I could walk away, but the test of being a successful Prime Minister in my mind is doing the best job I could do in the circumstances we faced," he told Roughan.
As an example, he cited the errors made by the Government Communications Security Bureau with regard to the monitoring and arrest of Mr Dotcom, for which Mr Key as the minister-in-charge of the intelligence agency had to carry responsibility.
"Nothing I could do about it. Didn't know about it, didn't authorise it, wasn't part of it. You are just there."
Mr Key does not "beat myself up over that stuff". He says "it just comes with the job". His wife told him he was not a loser if he had done the best job he could and done all he could.
The couple agreed that should he quit, he would be running away from the job - "and why would I do that?"
The upshot was that Mr Key spent that summer holiday in Hawaii recharging and reflecting on how to revitalise his administration.
One of his first acts on his return was to sack two lower-ranked Cabinet ministers - as Roughan puts it - "for nothing in particular that they had done".
Kate Wilkinson and Phil Heatley would have had no inkling of their fate when they were summoned to the Prime Minister's office, because Mr Key talks to every minister about the work programme in their portfolios for the 12 months ahead.
Of Ms Wilkinson's interview, Mr Key told Roughan: "I said, 'Look, you've done a great job as a minister, but it's over.' She said, 'What have I done wrong?' I said, 'Nothing. You have done four years and I want to refresh.' I said the same thing to Phil."
The book also confirms that several of the dozen National MPs retiring at the coming election are doing so on Mr Key's advice.
"Some of the hardest conversations are with people who haven't got there [become a Cabinet minister] and I've just said, 'Look, honestly, it won't happen.'"
The biography also reveals that Mr Key has doubts about whether he would have carried on seeking a career in politics had his acrimonious challenge in 2002 for the National candidacy in the Helensville seat failed. Urged on by then National Party president Michelle Boag, he managed to oust the seemingly entrenched incumbent MP Brian Neeson - but only narrowly and only after some of the latter's supposed supporters switched sides.
"If we hadn't won the selection in 2002, I thought I would try again in 2005. But I often wonder now whether I would have," he said. "It is more bruising and difficult than you think. It's pretty down and dirty."
The key to PM's popularity - writer thinks he knows secret
John Roughan, the author of a biography of John Key published today, has a new take on why the Prime Minister has such a strong rapport with voters.
The senior Herald journalist says politicians normally follow advice not to put themselves in potentially embarrassing situations - such as wearing a funny hat or unbecoming clothing - especially when the media and cameras are present.
Mr Key, however, is an exception. He indulges in "publicity risks" - such as appearing at the Big Gay Out or his memorable but excruciating catwalk strut modelling Rugby World Cup uniforms - because such events play well for him.
Roughan argues that the more ordinary and even error-prone Mr Key appears in such moments, the more it works - because it's marked contrast to his wealth and business success.
"The latter could easily work against him in politics if he was not seen to be so transparently normal and even average in other respects."
Roughan says that nothing seems to be hidden with Mr Key. In private and in public, he is open-faced and talkative. He answers as many questions as reporters wish to throw at him, rather than closing them off and walking away as if he has something to hide.
Roughan cites other, more orthodox, reasons for Mr Key's popularity, including that he had done nothing to antagonise voters during his early years in Parliament.