WASHINGTON — President Trump picked a new leader for the Office of Government Ethics on Friday, naming the agency’s general counsel, David J. Apol, as the acting director.

By making the appointment temporary and avoiding Senate confirmation hearings, Mr. Trump is able, at least for now, to avoid an extended public debate before lawmakers about the role of the ethics office during the Trump administration.

Mr. Apol will replace Walter M. Shaub Jr., who resigned Tuesday six months short of the end of his five-year term as the agency’s executive director. His resignation followed a period of intense criticism by Mr. Shaub of Mr. Trump and the administration’s approach to managing government ethics.

Mr. Apol, who has worked on ethics issues in the federal government in various posts for three decades, said in a brief interview Friday that he looked forward to the new assignment, in which he will be overseeing the agency charged with monitoring ethics compliance at federal agencies across the government, including the White House.