WASHINGTON—The Justice Department is expected to publish a legal opinion in support of Matthew Whitaker’s installation as acting attorney general as early as Tuesday, a person familiar with the matter said, following questions about whether he can legally serve in the role.

The department’s Office of Legal Counsel is expected to say that President Trump had the ability to appoint Mr. Whitaker, the person said. Mr. Whitaker took over last week as an interim successor to former Attorney General Jeff Sessions when Mr. Sessions was ousted by Mr. Trump.

The opinion is expected to support the Trump administration’s position that the president’s authority to tap Mr. Whitaker is affirmed by guidance the office issued in 2003. At that time, the office concluded that President George W. Bush could name a non-confirmed employee of the Office of Management and Budget as the agency’s acting director.

Trump: I Don’t Know Matt Whitaker President Donald Trump told reporters at the White House that he doesn't know Matthew Whitaker, his new acting attorney general, but that he is "a very highly respected man." Photo: AP

The OMB director, like the attorney general, is a principal officer of the federal government. The 2003 opinion avoided that problem by defining an acting director as an “inferior officer,” who under Supreme Court precedent doesn’t require Senate approval to be appointed.

Critics from across the ideological spectrum have said Mr. Whitaker’s appointment is a potentially invalid end-run around the Senate’s power to provide “advice and consent” on senior executive-branch nominations. Others have said Mr. Whitaker’s appointment was lawful under a statute called the Vacancies Reform Act.

In addition, others say Mr. Whitaker’s ties to a witness in special counsel Robert Mueller’s probe into Russian interference in the 2016 elections and his history of critical comments about that inquiry raise questions about his impartiality and his ability to supervise it. The special counsel is designed to be insulated from political considerations.

Justice Department spokeswoman Kerri Kupec said Mr. Whitaker would follow “all appropriate processes and procedures,” including consulting with senior ethics officials on “his oversight responsibilities and matters that may warrant recusal.”

The Office of Legal Counsel’s opinion is unlikely to quell the debate over Mr. Whitaker’s leadership. The appointment could still face a legal challenge that, if successful, could invalidate actions Mr. Whitaker takes as acting attorney general. Officials in acting capacities are often viewed as placeholders who don’t pursue policy initiatives until a permanent official is confirmed by the Senate.

Even if short-lived, the appointment of Mr. Whitaker, who was Mr. Sessions’ chief of staff, could have far-reaching consequences, including for the Mueller investigation.

Congressional Democrats on Monday asked the Justice Department to detail any ethics advice Mr. Whitaker has sought or received since taking office, including questions about his supervision of the Russia probe.

“The official supervising the Special Counsel investigation must be—in both fact and appearance—independent and impartial. Regrettably, Mr. Whitaker’s statements indicate a clear bias against the investigation that would cause a reasonable person to question his impartiality,” the Democrats wrote.

The Justice Department didn’t respond to requests for comment on the letter.

Congress is preparing to return to Washington on Tuesday for the first time since the Nov. 6 midterm elections, in which Democrats took control of the House and Republicans maintained a narrow Senate majority. With control of one chamber, Democrats will be able to run investigations and issue subpoenas, and several party leaders have signaled they plan to look into Mr. Whitaker’s appointment.

Many Republicans say they aren’t concerned by Mr. Whitaker’s appointment or his past comments that were critical of the Mueller probe. “I’m confident that Mr. Mueller will be allowed to do his job without interference,” Sen. Lindsey Graham (R., S.C.), a senior member of the Senate Judiciary Committee, said Sunday on CBS.

The Democrats’ letter was signed by Rep. Nancy Pelosi of California and Sen. Chuck Schumer of New York, the Democratic leaders in the House and Senate respectively. The top Democrats on the Judiciary and Intelligence committees of the House and Senate also signed the letter, as did the senior Democrat on the House Oversight and Government Reform committee.

A challenge to Mr. Whitaker’s appointment could land at the Supreme Court. In recent years, the court has invalidated several executive appointments at the National Labor Relations Board, including then-President Obama’s appointments to the board during a brief Senate break in 2012, and his decision in 2011 to nominate as the board’s general counsel an official who continued to serve in the post in an acting capacity.

Those rulings threw into question hundreds of decisions the officials made while in the posts and forced the agency to revisit them. Legal experts said the Justice Department is likely keeping those rulings in mind when advising Mr. Whitaker on any actions he takes that could be challenged. A Justice Department spokeswoman declined to comment on whether the legal counsel’s office has weighed in on whether Mr. Whitaker’s actions could be invalidated.

The Federal Bureau of Investigation is conducting a criminal investigation of a Florida company, World Patent Marketing Inc., that is accused of scamming millions from customers during the period that Mr. Whitaker served as a paid advisory-board member, The Wall Street Journal previously reported. As attorney general, Mr. Whitaker has authority over the FBI, which is a component of the Justice Department. The Justice Department has said Whitaker was unaware of any fraudulent activity.

Mr. Whitaker ran a conservative political nonprofit and frequently appeared on cable television as a legal commentator before becoming Mr. Sessions chief of staff.

Mr. Trump has praised Mr. Whitaker but also has distanced himself from him.

—Aruna Viswanatha contributed to this article.

Write to Sadie Gurman at sadie.gurman@wsj.com and Byron Tau at byron.tau@wsj.com