After a judge indicated on Monday that he was inclined to side with Mr. Kupperman to keep Mr. Mulvaney out of the suit, Mr. Mulvaney withdrew his request and said he would file a lawsuit of his own. Then he changed his mind again.

Mr. Mulvaney has become a key figure in the House impeachment inquiry, which begins public hearings on Wednesday. He carried out the president’s order to suspend $391 million in security aid to Ukraine at the same time Mr. Trump was pressuring that country’s leader to provide damaging information about former Vice President Joseph R. Biden Jr. and other Democrats.

According to testimony gathered by House investigators, Mr. Mulvaney helped facilitate the pressure campaign while Mr. Bolton resisted it. At one point, Mr. Bolton declared that he would have no part in the “drug deal” that Mr. Mulvaney and other allies of the president were concocting and directed a deputy to report details of the scheme to a White House lawyer.

Mr. Mulvaney last month effectively confirmed the quid pro quo Democrats were trying to prove by publicly acknowledging that Mr. Trump held up the security aid in part to force Ukraine to investigate a debunked conspiracy theory about Ukraine aiding Democrats in the 2016 presidential election. Mr. Mulvaney tried to disavow his admission hours later.

House Democrats have argued that Mr. Mulvaney can hardly claim a presidential immunity to refuse to testify about matters that he was willing to discuss in the White House briefing room. But it remained unclear how far they would go to try to compel him to cooperate in the impeachment inquiry.