WASHINGTON — It was not a country that would naturally have seemed high on the priority list of a president who came to office relishing a trade clash with China, promising to reorder the Middle East and haranguing European allies to spend more on NATO.

But for President Trump, Ukraine has been an obsession since the 2016 campaign.

Long before the July 25 call with the new Ukrainian president that helped spur the formal start of impeachment proceedings against him in the House, Mr. Trump fretted and fulminated about the former Soviet state, angry over what he sees as Ukraine’s role in the origins of the investigations into Russian influence on his 2016 campaign.

His fixation was only intensified by his hope that he could employ the Ukrainian government to undermine his most prominent potential Democratic rival in 2020, former Vice President Joseph R. Biden Jr.

His personal lawyer, Rudolph W. Giuliani, has undertaken a nearly yearlong, free-ranging effort to unearth information helpful to Mr. Trump and harmful to Mr. Biden.