The lawsuit was the first time that the House had initiated legal action against a witness in Mr. Mueller’s Russia investigation, but it added to an uptick in House legal activity to vindicate its oversight powers. Last month, the Ways and Means Committee filed a separate lawsuit seeking disclosure of Mr. Trump’s tax returns, and the Judiciary Committee asked a federal judge to grant it access to secret grand jury evidence related to Mr. Mueller’s investigation.

The Justice Department declined to comment on the lawsuit. William A. Burck, a lawyer for Mr. McGahn, said on Wednesday that his client would continue to follow Mr. Trump’s instruction unless a judge ruled that he must comply.

“People should not forget that Don McGahn is a lawyer and has an ethical obligation to protect client confidences, and as I have said before, Don does not believe he witnessed any violation of law,” Mr. Burck said. “When faced with competing demands from coequal branches of government, Don will follow his former client’s instruction, absent a contrary decision from the federal judiciary.”

Republicans on the Judiciary Committee accused Democrats of cutting off negotiations that could have resolved the dispute out of court. Representative Doug Collins of Georgia, the top Republican on the panel, said the majority was “only interested in the fight and public spectacle of an investigation, but not actually in obtaining any real information.”

The filing did note, however, that the Judiciary Committee and the White House had reached an agreement to allow lawmakers to review documents related to the Mueller case in Mr. McGahn’s possession.

Perhaps no government official was a more prominent witness in Mr. Mueller’s report than Mr. McGahn, who left the White House in late 2018. He spent more than 30 hours with the special counsel’s investigators.

Mr. McGahn was the central witness to two of the most important obstruction-of-justice episodes recounted in the Mueller report. Mr. McGahn told the special counsel that Mr. Trump ordered him to have Mr. Mueller fired in June 2017; Mr. McGahn refused and prepared to quit in protest, and Mr. Trump backed off. Later, when that firing attempt came to light, Mr. Trump tried to pressure Mr. McGahn into falsifying a piece of evidence denying that it had happened.