WASHINGTON — John Bolton, President Donald Trump’s former national security adviser, alleged in his new book titled “The Room Where It Happened: A White House Memoir” released last week that Mr. Trump pleaded with Chinese President Xi Jinping to help him win the 2020 election by ensuring China purchased billions of dollars of US farm products. Mr. Bolton said the request was made during a meeting between the two presidents in Osaka, Japan, during the G-20 summit in June 2019.

Regarding the June 2019 exchange between Mr. Trump and Mr. Xi, Mr. Bolton in his book, excerpts of which were published in The Wall Street Journal, said, “He (Mr. Trump) stressed the importance of farmers and increased purchases of soybeans and wheat in the electoral outcome.”

Mr. Bolton added, “Trump’s conversations with Xi reflected not only the incoherence of his trade policy but also the confluence in Trump’s mind of this own political interest and US national interests.”

Administration officials, including Robert E. Lighthizer, the US trade representative, who, like Mr. Bolton, accompanied Mr. Trump to Osaka, disputed Mr. Bolton’s account.

Mr. Lighthizer, while testifying before the House Committee on Ways on Means on the administration’s trade policies, asked if he recollected Mr. Trump pleading with Mr. Xi for help with securing farm votes, said it never happened.

“I don’t believe it’s true,” Mr. Lighthizer said. “Would I recollect something as crazy as that? Of course, I would recollect it.”