Privately, Mr. Trump has had harsh words about Ukraine, a former Soviet state. He has been dismissive of his own administration’s recommendations that he throw the full support of the United States government to Mr. Zelensky, a former comedian and political neophyte who is seen in the West as a reformer elected with a mandate to stop both Russian aggression and the political corruption that has long plagued the country.

In May, a delegation of United States officials returned from Mr. Zelensky’s inauguration praising the new president and urging Mr. Trump to meet with him, arguing that Mr. Zelensky faced enormous headwinds and needed American support. The future of Ukraine, they said during an Oval Office meeting with Mr. Trump, would be decided in the next six months.

Mr. Trump was not sympathetic. “They’re terrible people,” he said of Ukrainian politicians, according to people familiar with the meeting. “They’re all corrupt and they tried to take me down.”

The skepticism harbored by Mr. Trump and Mr. Giuliani toward the Ukrainian government is derived at least partly from their belief that officials in the Ukrainian government of the time supported Hillary Clinton’s 2016 presidential campaign and tried to sabotage Mr. Trump’s.