The release order on Monday came after District Judge Henry Floyd ruled that President George Bush had no authority to order a US citizen to be jailed indefinitely as an "enemy combatant".
Padilla, who at one time was accused of plotting to detonate a "dirty bomb", was arrested in May 2002 and has been held without charge in a South Carolina naval prison under sweeping presidential powers enacted after the September 11 attacks.
A Justice Department official in Washington said the department would appeal the court's decision.
Bush had designated Padilla an "enemy combatant" but Judge Floyd ruled the president had no authority to hold Padilla or to suspend his right to due legal process.
Convert to Islam
"The court finds that the president has no power, neither express nor implied, neither constitutional nor statutory, to hold [Padilla] as an enemy combatant," Floyd ruled in Spartanburg, South Carolina.
President Bush has been accused
of eroding civil liberties
Floyd,, who was appointed to the federal bench by Bush in 2003, said the case was a law enforcement matter, not a military one, and that unless Padilla was charged with a crime, he should be freed.
"If the law in its current state is found by the president to be insufficient to protect this country from terrorist plots, such as the one alleged here, then the president should prevail upon Congress to remedy the problem," said Floyd.
Padilla, a former Chicago gang member and convert to Islam, is a US citizen who was arrested at Chicago's O'Hare airport.
US attorney-general John Ashcroft said at the time that Padilla was suspected of plotting with al-Qaida to set off a radioactive "dirty bomb" in the US.
US officials later backed off that claim and said Padilla had plotted with al-Qaida's leaders to blow up apartment buildings by using natural gas. None of the plots were carried out.
"The court finds that the president has no power, neither express nor implied, neither constitutional nor statutory, to hold [Padilla] as an enemy combatant"
US District Judge Henry Floyd
Padilla's attorneys argued that Bush overstepped his authority in ordering the detention, and a federal appeals court in New York ordered his release.
The government appealed and argued that Bush did have authority to detain Padilla.
In June, the US Supreme Court ruled that the New York court lacked jurisdiction but allowed the case to be filed again in South Carolina.
At the time, the American Civil Liberties Union (ACLU) called the ruling "yet another setback to the administration's misguided belief that it does not have to follow our constitutional traditions in pursuing terrorists".
After Monday’s ruling, ACLU executive director Anthony Romero commented: "As Judge Floyd recognised in his opinion, President Bush's actions in the Padilla case flout the checks and balances that ensure our democracy and liberty."