The US defence department posted the 11-page list on its website late on Wednesday in response to a Freedom of Information Act lawsuit by the Associated Press.
The largest number of detainees on the list came from Saudi Arabia, with 132, followed by Afghanistan with 125 and Yemen with 107. The prisoners came from 40 countries and the West Bank.
Only 10 of the detainees at the US naval base at Guantanamo Bay, Cuba, have been charged, and not one of the trials has been completed.
Most of the detainees were captured in Afghanistan, and the Pentagon accused many of complicity with al-Qaeda or the Taliban.
The Pentagon had designated the detainees as "enemy combatants", denying them the rights accorded to prisoners of war under international agreements.
Rights activists have condemned the indefinite detentions and the prisoners' lack of legal rights. UN rights investigators have called for the closure of the prison.
Starting with the arrival from Afghanistan of the first group of 20 shackled and masked detainees on January 11, 2002, the US had never until now released a comprehensive list of the names and nationalities of the Guantanamo prisoners.
The Pentagon long resisted providing the information, citing security concerns such as keeping groups such as al-Qaeda in the dark about who was being imprisoned.
The US previously identified some detainees in legal documents, while the names of hundreds had been made public by their relatives or lawyers.
There are about 490 detainees
at the prison camp
On March 3, the Pentagon released more than 5,000 pages of documents relating to military hearings given to detainees at the base, which formally identified hundreds of the detainees as the result of a court order in the Freedom of Information Act lawsuit by The Associated Press.
The Pentagon on April 3 released about 2,600 pages of additional documents with more information on the military review hearings given to detainees.
While the new list provided by the Pentagon contained 558 names, there are now about 490 detainees at the Guantanamo base, the Pentagon said.
Air Force Lieutenant-Colonel Todd Vician, a Pentagon spokesman, said the list included some detainees who went through the review process but had since been transported out of the base.
"The Department of Defence determined that it is prudent to release the list and while many of the names are already a matter of public record, today's release provides the public with a single consolidated list containing this information," Vician said.