WASHINGTON — The Supreme Court declined on Monday to decide whether President Trump acted lawfully in appointing Matthew G. Whitaker to be the acting attorney general, denying an unusual motion asking the justices to address that question in the context of a case about a different issue. The court also turned down the case itself.

The court’s order was two sentences long and gave no reasons. There were no noted dissents.

The case, Michaels v. Whitaker, No. 18-496, concerned Barry Michaels, who was convicted of securities fraud in 1998 and wanted to buy a gun. He challenged a federal law banning gun ownership by people convicted of felonies on Second Amendment grounds.

The request for a ruling on Mr. Whitaker’s appointment came in the form of a motion to change the name of the case to Michaels v. Rosenstein, on the theory that Deputy Attorney General Rod J. Rosenstein is the rightful acting attorney general because Mr. Whitaker’s appointment violated federal statutes and the Constitution.

Legal scholars are divided on whether Mr. Whitaker’s appointment was lawful.

The answer to the question could figure in the fate of Robert S. Mueller III’s investigation of Russian interference in the 2016 election. The investigation had been supervised by Mr. Rosenstein and has passed to Mr. Whitaker, who has been critical of it.