WASHINGTON—A draft of a forthcoming book from former national security adviser John Bolton alleges that President Trump told him in August that he wanted to keep aid to Ukraine frozen until the country aided investigations into Democrats, including former Vice President Joe Biden and his son. The development threatened to throw into turmoil the careful choreography of the Senate impeachment trial of Mr. Trump.

Mr. Bolton’s claim, which was reported by the New York Times and confirmed by a lawyer for Mr. Bolton, goes to the heart of Democrats’ impeachment inquiry and contradicts the White House’s argument that the decision to hold up nearly $400 million in aid to Ukraine wasn’t related to the president’s push for investigations there. Democrats have said the president abused his power by leveraging aid approved by Congress to get a foreign leader to undertake actions that would benefit him politically.

Mr. Trump late Sunday evening denied Mr. Bolton’s allegations. “I NEVER told John Bolton that the aid to Ukraine was tied to investigations into Democrats, including the Bidens,” the president tweeted. “In fact, he never complained about this at the time of his very public termination. If John Bolton said this, it was only to sell a book.”

Mr. Bolton’s lawyer, Charles Cooper, said he sent a copy of his manuscript to the National Security Council in December so it could be reviewed for classified information, adding that he did so on the assurance that the contents of the book wouldn’t be disclosed to anyone not involved in that process.

“It is clear, regrettably, from The New York Times article published today that the prepublication review process has been corrupted and that information has been disclosed by persons other than those properly involved in reviewing the manuscript,” Mr. Cooper said.