Trump is the Republican candidate challenging Democratic President Joe Biden in the November 5 US election in a rematch from four years ago.
A Trump campaign spokesperson reiterated the former president’s previous call to dismiss all four criminal cases against him in light of Cannon’s decision.
Cannon broke with decades of rulings by other federal courts that have upheld the authority of the attorney-general to empower a special counsel to handle politically sensitive investigations.
The practice has been used for decades by presidential administrations of both political parties. Special counsels have also investigated Biden and his son Hunter Biden.
Cannon’s ruling dismissed the charges against Trump and co-defendants Walt Nauta, a personal aide to Trump, and Carlos De Oliveira, a property manager at the former president’s Mar-a-Lago estate in Florida where the documents were found during an FBI search.
Trump was accused of illegally retaining sensitive national security documents, including records related to the US nuclear programme and potential military vulnerabilities, at Mar-a-Lago after leaving office in January 2021.
Trump and the two co-defendants also were accused of obstructing an investigation into the former president’s handling of the material.
Trump and his co-defendants had pleaded not guilty.
In addition to the two indictments obtained by Smith, Trump faced criminal charges in a pair of other cases.
He became the first former US president to be convicted of a crime when a jury in New York state court found him guilty in May of criminal charges related to hush money paid to porn star Stormy Daniels to avert a sex scandal before the 2016 election.
He faces sentencing in September. Trump also faces state charges in Georgia related to his efforts to overturn his 2020 defeat.
The two remaining criminal cases are not expected to be completed before the election.