President Donald Trump tried -- and failed -- to convince Chinese president Xi Jinping into helping him win reelection in November by intervening in the presidential election, according to a devastating revelation by former U.S. national security adviser John Bolton in his bombshell new book.

Trump's attempt to do so is illegal and amounts to inviting foreign intervention in U.S. affairs. It is an impeachable offense.

In his book, The Room Where It Happened: A White House Memoir, set to hit bookstores June 23, Bolton relates an incident in June 2019 at the Group of 20 summit in Japan. Talking to Trump through an interpreter, Xi complained about the bad press China was getting in the United States.

Bolton writes Trump immediately assumed Xi meant the Democrats when he referred to critics. Trump told Xi there was great hostility among Americans to the Democrats.

"He then, stunningly, turned the conversation to the coming U.S. presidential election, alluding to China's economic capability to affect the ongoing campaigns, pleading with Xi to ensure he'd win," wrote Bolton.

He emphasized to Xi the importance of farmers, and said China increasing its purchases of U.S. soybeans and wheat will help him win reelection. Trump also told Xi Americans wanted him to change constitutional rules so he could serve more than two terms as president, an outright lie.

Trump let slip he'd asked Xi to help him win re-election on October 3, but for as different reason. He said China should start an investigation into Biden and his son, Hunter, because allegations of Biden's alleged corruption in China is just about as bad as what happened with Ukraine.

In July, Trump set in train the events that culminated in the Ukraine scandal, which led to his impeachment by the U.S. House of Representatives on December 19.

Bolton assailed Trump for his maniacal focus on reelection, saying he was hard-pressed to identify any significant Trump decision during his term as national security adviser not driven by reelection calculations.

The episode involving Xi is one of the many scandalous and illegal acts committed by Trump during Bolton's term of office from April 2018 to September 2019, when Trump unexpectedly fired him.

Among Bolton's other disturbing revelations:

* Trump regarded his June 12, 2018 summit with North Korean dictator Kim Jong-un nothing but "an exercise in publicity." He had no intention of reaching any sort of deal denuclearizing North Korea.

* Trump was willing to sign a substance-free communiqué with Kim to declare victory in the negotiations and then get out of town, said Bolton.

* Trump said he wanted U.S. troops out of Afghanistan during his second year instead of his third year so he could blame former president Barack Obama for the war.

* Trump wanted to build his border wall with Mexico because he got elected on this issue and was "going to get unelected" if he didn't do so.

* Bolton said obstruction of justice was a way of life with Trump. His revelations show Trump sold out the American people to protect his political future.

"If these accounts are true, it's not only morally repugnant, it's a violation of Donald Trump's sacred duty to the American people to protect America's interests and defend our values," said Joe Biden, the Democratic Party candidate for president, who is widely expected to unseat Trump on Nov. 3.

As for Trump as a person, Bolton said this man saw conspiracies behind rocks, and remained stunningly uninformed on how to run the White House and the huge federal government. Trump based his decisions on "personal instinct" and always sought opportunities for "reality TV showmanship."

Trump is also ignorant, said Bolton. He once asked former chief-of-staff John Kelly if Finland is part of Russia. He also didn't know the United Kingdom is a nuclear power. Trump also has difficulty making tough decisions.