The Yemeni prisoner, known as al-Hanashi, had been held without charge at the camp since February 2002.
Saleh had travelled Afghanistan in 2001 and joined the Taliban, according to declassified US military documents.
But he later said he was to forced to fight by the group and denied any link to al-Qaeda, the documents say.
Saleh had been on hunger strikes in the past to protest his detention, but was not among long-term hunger strikers currently being force-fed at the camp, a Guantanamo spokesman said.
|Saleh is the fifth prisoner to commit suicide
at the camp since 2002 [GALLO/GETTY]
An autopsy was due to be carried out and a "cultural adviser" was ensuring that his body was being treated in accordance with Islamic traditions, the military said.
"Upon completion of the autopsy, the remains will be prepared for repatriation to Yemen," the military said.
Since the detention camp opened in January 2002, four other prisoners have committed suicide by hanging themselves in their cells - three on the same day in June 2006 and one in May 2007.
Another prisoner died of colorectal cancer in December 2007.
The White House is still considering what to do with the 239 remaining captives held at Guantanamo, who include nearly 100 Yemenis.
Barack Obama, the US president, has ordered the camp be closed by January 2010.