"He couldn't tell the difference between his personal interests and the country's interests," writes Bolton, Trump's third national security adviser who served in the White House from April 2018 to September 2019.
The Trump administration has sued him to try to stop the book from being released, arguing he reveals classified information.
Bolton cited a conversation he said Trump had with Xi at the G-20 summit in Japan last June.
"He [Trump] then, stunningly, turned the conversation to the coming US presidential election, alluding to China's economic capability to affect the ongoing campaigns, pleading with Xi to ensure he'd win. He stressed the importance of farmers, and increased Chinese purchases of soybeans and wheat in the electoral outcome. I would print Trump's exact words, but the government's prepublication review process has decided otherwise," he writes.
U.S. Trade Representative Robert Lighthizer said at a congressional hearing Wednesday, "Absolutely untrue. Never happened. I was there. I have no recollection of that ever happening. I don't believe it's true. I don't believe it ever happened."
In another episode, regarding legal and national security concerns over allowing U.S. firms to do business with Chinese telecommunications company ZTE, Bolton provides what he says is a look into how Trump viewed his working relationship with Xi.
"Here it was all about Trump and Xi. In countless other episodes, he had trouble divorcing the personal from the official," Bolton writes. "Trump was barely talking to Attorney General Sessions, let alone considering his advice. Instead, Trump was writing Xi personal handwritten notes, which had the White House Counsel's office climbing the walls … Trump had given ZTE not just a reprieve but a new lease on life. And what did we receive in exchange? Good question."
"On the other hand, Trump came increasingly to view China as trying to influence the 2018 congressional elections against Republicans, and more important (to him), was working for his defeat in 2020," Bolton continued.
Trump's critics and Democrats have complained that Bolton should have come forward with his claims four months ago during House impeachment proceedings. Though Bolton offered to testify in the Senate, Republicans blocked the move.
"A President may not misuse the national government's legitimate powers by defining his own personal interest as synonymous with the national interest, or by inventing pretexts to mask the pursuit of personal interest under the guise of national interest. Had the House not focused solely on the Ukraine aspects of Trump's confusion of his personal interests (whether political or economic), but on the broader pattern of behavior – including his pressure campaigns involving Halkbank, ZTE, and Huawei among others -- there might have been a greater chance to persuade others that 'high crimes and misdemeanors' had been perpetrated," he continued.
"In fact, I am hard-pressed to identify any significant Trump decision during my tenure that wasn't driven by re-election calculations," Bolton writes.
In the book, Bolton says Democrats' impeachment efforts focused too narrowly on the Ukraine affair in claiming he used the powers of the presidency to target his political opponent, former Vice President Joe Biden.
"The consequences of this partisan approach by the House were twofold. First, it narrowed the scope of the impeachment inquiry dramatically and provided no opportunity to explore Trump's ham-handed involvement in other matters -- criminal and civil, international and domestic -- that should not properly be subject to manipulation by a President for personal reasons (political, economic, or any other)," Bolton writes.
But, in keeping with his theme that Trump has improperly use his presidential power to advance his personal political interests, he corroborates testimony in the House impeachment hearings that Trump linked U.S. security aid for Ukraine to a promise to investigate his political rivals, Biden and former Secretary of State Hillary Clinton.
"Throughout my West Wing tenure, Trump wanted to do what he wanted to do, based on what he knew and what he saw as his own best personal interests. And in Ukraine, he seemed finally able to have it all," he says. President Trump "said he wasn't in favor of sending them anything until all the Russia-investigation materials related to Clinton and Biden had been turned over."
"The pattern looked like obstruction of justice as a way of life, which we couldn't accept," Bolton writes, adding that he reported his concerns to Attorney General William Barr -- and that he, Secretary of State Mike Pompeo and Defense Secretary Mark Esper tried repeatedly to get Trump to release the aid to Ukraine.
Bolton cites Trump's dealings with North Korea as another example of where he claims Trump's personal concerns took precedence over the country's.
On Trump's June 2018 summit in Singapore with North Korean leader Kim Jong Un, Bolton wrote that he grew "more pessimistic" about the event the closer it drew.
"Worse, we were legitimizing Kim Jong Un, commandant of the North Korean prison camp, by giving him a free meeting with Trump," he writes. "I was sick at heart over Trump's zeal to meet with Kim Jong Un."
"Now it was going to happen. North Korea had what it wanted from the United States and Trump had what he wanted personally. This showed the asymmetry of Trump's view of foreign affairs. He couldn't tell the difference between his personal interests and the country's interests."
The Justice Department asked a federal judge on Tuesday to order Bolton to complete the pre-publication review and "not disclose classified information without written authorization," though the book is already said to be sitting in warehouses and is a best-seller on Amazon.
Bolton, a conservative Republican known for his hawkish foreign policy views, discussed his new book, "The Room Where It Happened," exclusively with ABC News' Chief Global Affairs Correspondent Martha Raddatz in a special airing on Sunday starting at 9 p.m. ET with clips airing on ABC's "Good Morning America" and "World News Tonight" throughout the week.
The book is scheduled to be published next Tuesday, June 23.
In the epilogue, Bolton concludes in a second term Trump could be "far less constrained by politics than he was in his first term."
"The irony could well be that Democrats will find themselves far more pleased substantively with a 'legacy'-seeking Trump in his second term than conservatives and Republicans," Bolton writes. "Something to think about."