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, The New York Times reported.
Mr. Rosenstein was just two weeks into his job. He had begun overseeing the Russia investigation and played a key role in the president's dismissal of Mr. Comey by writing a memo critical of his handling of the Hillary Clinton email investigation. But Mr. Rosenstein was caught off guard when Mr. Trump cited the memo in the firing, and he began telling people that he feared he had been used.
Mr. Rosenstein made the remarks about secretly recording Mr. Trump and about the 25th Amendment in meetings and conversations with other Justice Department and F.B.I. officials. Several people described the episodes in interviews over the past several months, insisting on anonymity to discuss internal deliberations. The people were briefed either on the events themselves or on memos written by F.B.I. officials, including Andrew G. McCabe, then the acting bureau director, that documented Mr. Rosenstein's actions and comments.
None of Mr. Rosenstein's proposals apparently came to fruition. It is not clear how determined he was about seeing them through, though he did tell Mr. McCabe that he might be able to persuade Attorney General Jeff Sessions and John F. Kelly, then the secretary of homeland security and now the White House chief of staff, to mount an effort to invoke the 25th Amendment.
The extreme suggestions show Mr. Rosenstein's state of mind in the disorienting days that followed Mr. Comey's dismissal. Sitting in on Mr. Trump's interviews with prospective F.B.I. directors and facing attacks for his own role in Mr. Comey's firing, Mr. Rosenstein had an up-close view of the tumult. Mr. Rosenstein appeared conflicted, regretful and emotional, according to people who spoke with him at the time.
Mr. Rosenstein disputed this account.
"The New York Times's story is inaccurate and factually incorrect," he said in a statement. "I will not further comment on a story based on anonymous sources who are obviously biased against the department and are advancing their own personal agenda. But let me be clear about this: Based on my personal dealings with the president, there is no basis to invoke the 25th Amendment."
A Justice Department spokeswoman also provided a statement from a person who was present when Mr. Rosenstein proposed wearing a wire. The person, who would not be named, acknowledged the remark but said Mr. Rosenstein made it sarcastically.