In addition, Special Counsel Jack Smith has also charged Trump with other crimes in connection with his attempts to overturn the 2020 result: Conspiring to defraud the US and conspiring against the rights of citizens.
Those charges will go ahead regardless of the outcome of the obstruction case.
The special prosecutor faces an obvious deadline. If Trump wins the November election, he will be able to remove Mr Smith from his post and end the federal legal case.
The Sarbanes-Oxley Act was one of a number of laws used against those who stormed the Capitol in January 2021.
About 25% of Capitol riot defendants were prosecuted under the law, and according to Attorney General Merrick Garland, all of those faced additional charges.
“The vast majority of the more than 1,400 defendants charged for their illegal actions on January 6 will not be affected by this decision,” Mr Garland said in a statement issued after the decision in which he also noted he was disappointed with the ruling.
The case was brought to the Supreme Court by Joseph Fischer, a former police officer from Pennsylvania who attended Trump’s rally in Washington on 6 January 2021, then briefly went inside the Capitol.
He was seen arguing with police on video before leaving the building.
Lower courts will now decide whether the obstruction charge against him can continue. However, Mr Fischer also faces trial on a number of other charges including civil disorder, disorderly conduct and assaulting, resisting or impeding a police officer.