WASHINGTON—Attorney General William Barr called President Trump in April with a question: What was Rudy Giuliani doing?

Mr. Trump had just avoided criminal charges with the release of former special counsel Robert Mueller’s report on Russian electoral interference. But Mr. Giuliani was on television attacking former White House counsel Don McGahn, a longtime friend of the attorney general who had testified to investigators about some of the most notable incidents in the report, including Mr. Trump’s efforts to seek Mr. Mueller’s...