As the title indicates, the book does not paint a rosy picture of the atmosphere in the White House. An author’s note describes a venomous den in which people are constantly at each other’s throats. But Mr. Sims’s goal, according to people familiar with the book, was not to damage Mr. Trump. And he is said to have at times painted an unflattering portrait of himself.

Still, there has long been a wide gap between how Mr. Trump would like his White House to be perceived (a “well-oiled machine”) and the reality of how it operates. The common thread for most of the half-dozen books that have been published about the Trump administration has been the affirmation of real-time news accounts of chaos behind the White House gates.

Mr. Sims was represented by Matt Latimer and Keith Urbahn of Javelin DC, whose clients include James B. Comey, the former F.B.I. director who was fired by Mr. Trump in May 2017. Mr. Sims, whom Mr. Trump often saw as a buddy, was pulled into several meetings that were well beyond the scope of his duties, according to the announcement from the publisher.

He kept hundreds of pages of notes during his time at the White House, the people familiar with the project said. He was among the Trump loyalists who left this year after clashing with the White House chief of staff, John F. Kelly.

The White House declined to comment.

In the author’s note, Mr. Sims writes: “I suspect that posterity will look back on this bizarre time in history like we were living on the pages of a Dickens novel.” He added: “Lincoln famously had his Team of Rivals. Trump had his Team of Vipers. We served. We fought. We brought our egos. We brought our personal agendas and vendettas. We were ruthless. And some of us, I assume, were good people.”