KIEV, Ukraine — As soon as he got the invitation from Rudolph W. Giuliani, President Trump’s personal lawyer, it was abundantly clear to him what Mr. Trump’s allies were after.

“I understood very well what would interest them,” Yuriy Lutsenko, Ukraine’s recently fired prosecutor general, said in an extensive interview in London. “I have 23 years in politics. I knew.”

“I’m a political animal,” he added.

When Mr. Lutsenko sat down with Mr. Giuliani in New York in January, he recalled, his expectations were confirmed: The president’s lawyer wanted him to investigate former Vice President Joseph R. Biden Jr. and his son Hunter.

It was the start of what both sides hoped would be a mutually beneficial relationship — but one that is now central to the impeachment inquiry into Mr. Trump.