The Pentagon spokesman would not say when or where Rahim was captured or how long he had been held by the CIA, but said he was transferred to Cuba earlier this week.
"He had knowledge of or was involved in al-Qaeda attacks and plans against coalition forces in Afghanistan," Whitman said.
"At the time of his capture he was providing support to anti-coalition militias and groups allied with Al-Qaeda."
Rahim, an Afghan national from the country's eastern Nangahar province, is believed to have begun working with al-Qaeda in the mid-1990s as a supplier and later as a courier between the network's senior leader.
"He carried messages for UBL [Osama bin Laden] in early 2002. He met with chief financial officer Shayleh Said al-Masri in 2004," Whitman said.
Rahim is the 16th so-called "high value" prisoner to be transferred to Guantanamo since September 2006 when George Bush, the US president, acknowledged the existence of secret CIA detention facilities overseas.
Michael Hayden, CIA director, said in a memo obtained by the Associated Press news agency that the "tough, seasoned jihadist" had been captured last summer.
He said that the suspect was proficient in several languages and familiar with the border areas of Afghanistan and Pakistan.
Meanwhile, Michael Mukasey, the US attorney general, said that he hoped the six Guantanamo prisoners charged with the September 11 attacks would not receive the death penalty.
Speaking at the London School of Economics, Mukasey said the death penalty would allow the six, including the self-confessed commander of al-Qaeda's foreign military operations, to portray themselves as victims.
"I hope they don't get the death penalty, they would see themselves as martyrs," Mukasey said in response to questions at a talk on Anglo-American law enforcement.