President Donald Trump is an "unethical" man "untethered to truth and institutional values," former FBI Director James Comey writes in his eagerly anticipated memoir, which paints the president as living in "a cocoon of alternative reality."

In the book, "A Higher Loyalty: Truth, Lies and Leadership," which NBC News obtained on Thursday ahead of its scheduled release next week, Comey recounts with a professional story-teller's flair his encounters and disagreements with Trump, who fired him on May 9.

Comey hews closely to the accounts he has given of his clashes with the president in congressional testimony and other public accounts, more painting a picture of what his life was like during the stressful first few months of the Trump administration than building a courtroom case.

Few earth-shattering details emerge, but numerous detailed observations fill in some of the blanks of his version of events in the federal investigation of alleged Russian interference in the 2016 presidential election, the FBI's investigation of Hillary Clinton's use of a private email server when she was secretary of state and the so-called Steele dossier, the 35-page opposition-research document alleging that Trump's presidential campaign colluded with Russia.

And in case you were wondering, the president's hands are not, in fact, "unusually small," Comey writes.

Perhaps most striking is Comey's description of Trump and his advisers as being utterly unconcerned with whether Russia meddled in the election during his first meeting with the president-elect in January 2017 at Trump Tower in New York.

Rather, he writes, "the Trump team" — White House Chief of Staff-designate Reince Priebus, Vice President-elect Mike Pence and Trump spokesman Sean Spicer, with Trump joining in — "debated how to position these findings for maximum political advantage."

"I had been in many intelligence briefings with the two previous presidents and had never seen Presidents Bush or Obama discuss communications and political strategy in front of intelligence community leaders," Comey writes.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In that respect, Comey writes, Trump and his team were like the New York Mafia organizations he had hunted down as a federal prosecutor earlier in his career.

"I sat there thinking, Holy crap, they are trying to make each of us an 'arnica nostra' — friend of ours. To draw us in," he writes. "As crazy as it sounds, I suddenly had the feeling that, in the blink of an eye, the president-elect was trying to make us all part of the same family and that Team Trump had made it a 'thing of ours.'"

(In Italian, "cosa nostra," a common name for the Mafia, literally translates as "our thing.")

Comey also writes at length about his decision on Oct. 28, 2016 — less than two weeks before the presidential election — to announce that the FBI was looking into more emails connected to its investigation of Clinton's email server. He acknowledges that he assumed Clinton would win — as virtually every major poll suggested — and he writes that he didn't want to tarnish Clinton's presidency as illegitimate if it were to be learned later that the FBI had withheld the information.

In any event, he notes that Clinton's defenders frequently raised reports that Colin Powell used an AOL account when he was secretary of state, "as if that were relevant to the investigation."

"In fact, it entirely misses the point," he writes. "I have never seen any indication that Powell discussed on his AOL account information that was classified at the time, but there were numerous examples of Secretary Clinton having done so."

Elsewhere, Comey describes Trump as lapsing into paranoia about the Steele dossier, especially one of its more colorful (and unproven) allegations: that Trump had once cavorted with prostitutes in a Moscow hotel room. The dossier describes prostitutes' performing a highly unusual act involving urination with Trump present as a way to sully the bed, which had previously been used by President Barack Obama.

Trump raised the allegation at least four times, Comey writes, complaining that he hadn't even spent the night in the hotel room (which, Comey notes, he needn't have done for the still-unverified allegation to be true) and that "it bothered him if there was 'even a one percent chance' his wife, Melania, thought it was true."

"That distracted me slightly because I immediately began wondering why his wife would think there was any chance, even a small one," that the allegation was true, Comey writes.

Comey also fleshes out an incident that he told the Senate Intelligence Committee about last June — the president's efforts to protect his new national security adviser, Michael Flynn, efforts that Comey found highly inappropriate.

Flynn resigned in February 2017 as it emerged that he had misled Pence about his communications after Election Day with Sergey Kislyak, who was Russia's ambassador to the United States at the time. Pence repeated the misinformation in television appearances. (Flynn pleaded guilty to lying to the FBI in December.)

On Feb. 14, 2017, after a counterterrorism briefing, Trump ordered everyone out of the room except Comey, with whom he wanted to have a one-on-one chat, Comey writes. Once they were alone, Trump implored Comey to "let this go," calling Flynn a "good guy" whom he'd only reluctantly agreed to let leave because Flynn had lied to the vice president, Comey writes.

Comey called the request a deeply concerning intervention into an independent FBI investigation.

"Imagine the reaction if a President Hillary Clinton had asked to speak to the FBI director alone and urged him to back off the investigation of her national security advisor," he writes.

Comey writes that he made no commitment and that he soon left. As soon as he reached his car, he writes, he emailed his staff to say he was writing a memo to document the conversation because "to protect the FBI, and myself, I needed a contemporaneous record."

Throughout the book, Comey writes that Trump showed all the hallmarks of a congenital liar.

"I've seen many times over the years how liars get so good at lying, they lose the ability to distinguish between what's true and what's not," he writes.

And he includes this warning for America:

"We are experiencing a dangerous time in our country, with a political environment where basic facts are disputed, fundamental truth is questioned, lying is normalized and unethical behavior is ignored, excused or rewarded."