As President Trump’s attorney general, William Barr has come under criticism from Democrats and some Republicans who say he is acting more like the president’s personal lawyer than the nation’s top law-enforcement officer.

But Mr. Barr, who as a private citizen bristled at the barrage of legal and other challenges Mr. Trump faced during his first two years in office, said his long-held belief in executive power is more about protecting the presidency than the current officeholder.

“I...