WASHINGTON—He had barely been sworn in as attorney general when William Barr told Rod Rosenstein he had dibs on one of the Justice Department’s prized assets that was in his deputy’s office.

“Rod, I won’t take it now, but I want you to know, I’m going to take that once you’re gone,’” Mr. Barr told him.

The coveted item: The official portrait of Robert H. Jackson, whose government service from the New Deal era through World War II and beyond included the powerful roles of solicitor general, attorney general, Supreme Court justice, and chief U.S. prosecutor at Nuremberg.

Mr. Rosenstein often looked to Justice Jackson as a source of inspiration during his tumultuous two years as the department’s No. 2, citing him so often his staff members would compete to find fresh quotes for him to use. “We kind of had this little game,” said Zachary Bolitho, who worked in Mr. Rosenstein’s office.

At Mr. Rosenstein’s farewell celebration earlier this year, a friend joked that he invoked Justice Jackson “5.2 times every hour.”