"The Department has long taken the position-across administrations of both political parties-that "the President and his immediate advisers are absolutely immune from testimonial compulsion by a Congressional committee", according to the letter".
The White House is also resisting House demands for former White House counsel Donald McGahn's records and testimony pertaining to federal investigations of Trump, as well as by testimony by Mueller himself over his recently concluded report on Russian interference in the 2016 US election.
The decision is certain to deepen tensions between congressional Democrats and the Trump administration.
The White House said Monday it has instructed Don McGahn, former White House counsel, not to testify before the House Judiciary Committee on Tuesday.
In its memo released on Monday, the justice department said the president's former counsel did not have to testify.
Nadler and his committee may vote soon to hold McGahn or others in contempt of Congress, too.
If McGahn were to defy the White House, it could endanger his own career in Republican politics but also puts his law firm, Jones Day, in the president's crosshairs.
Preventing McGahn's cooperation with the House is one of several fronts of an aggressive war Trump has launched to resist efforts of oversight by House Democrats.
Nadler and House Democrats are anxious to pursue Trump, demanding testimony from key witnesses mentioned in the Mueller report.
In it, Justice Department Assistant Attorney General Steven Engel wrote that, "Congress may not constitutionally compel the President's senior advisers to testify about their official duties".
A similar legal opinion issued in 2014, under the Obama administration, argued that if Congress could force the president's closest advisers to testify about matters that happened during their tenure, it would "threaten executive branch confidentiality, which is necessary (among other things) to ensure that the President can obtain the type of sound and candid advice that is essential to the effective discharge of his constitutional duties".
The committee's chairman, Democratic Rep. Jerrold Nadler, has threatened to hold McGahn in contempt of Congress if he doesn't testify.
Barr released a redacted version of Mueller's 448-page report last month.
Mueller's report described numerous links between Trump's 2016 campaign and various Russians but did not find sufficient evidence to establish there was a criminal conspiracy with Moscow.
"It is simply not fathomable that a Constitution that grants Congress the power to remove a President for reasons including criminal behavior would deny Congress the power to investigate him for unlawful conduct - past or present - even without formally opening an impeachment inquiry", he added.
The committee kicked off a wide-ranging investigation in March into President Donald Trump for allegations of obstruction of justice and abuses of power.
Immunity is not the same as privilege, which the president claimed to keep the full, unredacted Mueller report out of Congress' clutches.