The deputy attorney general, Rod J. Rosenstein, suggested last year that he secretly record President Trump in the White House to expose the chaos consuming the administration, and he discussed recruiting cabinet members to invoke the 25th Amendment to remove Mr. Trump from office for being unfit.

Mr. Rosenstein made these suggestions in the spring of 2017 when Mr. Trump’s firing of James B. Comey as F.B.I. director plunged the White House into turmoil.

Over the ensuing days, the president divulged classified intelligence to Russians in the Oval Office, and revelations emerged that Mr. Trump had asked Mr. Comey to pledge loyalty and end an investigation into a senior aide.