Over the past year, the two men connected Mr. Giuliani with Ukrainians who were willing to participate in efforts to push a largely unsubstantiated narrative about the Bidens. They played a key role in a campaign by pro-Trump forces to press for the removal of the United States ambassador to Ukraine on the grounds that she had not shown sufficient loyalty to the president as he pursued his agenda there.

They met regularly with Mr. Giuliani, often at the Trump International hotel in Washington. And all the while, they were pursuing their own business schemes and, according to an indictment unsealed on Thursday, illegally funneling campaign contributions in the United States in the service of both their political and business activities.

The indictment, along with interviews and other documents, show Mr. Parnas, Mr. Fruman and their associates as somewhat hapless operators, scrambling recklessly to use their new connections to the highest levels of American politics to seek financial gain while guiding Mr. Giuliani, the former New York City mayor, into a Ukrainian political culture rife with self-dealing and ever-shifting alliances.