Faced with a sprawling investigation by the special counsel in Washington, President Trump must also contend with an independent-minded office of federal prosecutors in his hometown, New York, who are investigating his longtime personal lawyer and fixer, Michael D. Cohen.

Mr. Trump’s administration had fired the Obama-era leader of the United States attorney’s office for the Southern District of New York last year, after initially asking him to stay on. Earlier this year, the administration installed a Republican former prosecutor and party donor, Geoffrey S. Berman, after Mr. Trump made an unusual request to interview him personally.

Soon after assuming the Southern District post in January, Mr. Berman notified Justice Department officials in Washington of a possible appearance of conflict of interest in the then-undisclosed Cohen investigation, and officials concluded that he should be recused, according to people briefed on the matter.

The Justice Department has not specified the reason for the recusal, which left Mr. Berman’s handpicked deputy, Robert S. Khuzami, in charge of the investigation. A former terrorism prosecutor, Mr. Khuzami was chief of enforcement at the Securities and Exchange Commission during the Obama administration but also spoke at the Republican National Convention in 2004, defending the Patriot Act and endorsing George W. Bush for president.