Ghailani will be the first detainee of the US prison camp at Guantanamo Bay in Cuba to face trial before a civilian court.
The US government is expected to confirm the trial on Thursday.
Ghailani was captured in Pakistan in 2004 and was one of the 14 "high-value detainees" sent to Guantanamo from secret Central Intelligence Agency (CIA) prisons in September 2006.
At a 2007 hearing at Guantanamo Bay to determine that he was an "enemy combatant," Ghailani said he had supplied equipment used in the Tanzania bombing.
He told the Guantanamo review panel that he bought the explosives used in the bombing, as well as a mobile phone used by another person involved in the attack.
He was present when a third person bought a truck used in the attack, US military transcripts say.
However, Ghailani told the panel that he was unaware that the supplies would be used to attack the embassy, according to the transcripts.
Future of detainees
News of Ghailani's trial comes as the administration of Barack Obama, the US president, tries to form policy on how to deal with 240 foreign detainees held at the prison.
Obama pledged during his presidential candidacy that he would close the jail by the end of January 2010.
But members of the congress are against the transfer of any of the Guantanamo Bay prisoners to the US, arguing that it could put interests at home and abroad at risk.
Obama is set to deliver a speech on Thursday on how to handle the Guantanamo prisoners.
Eric Holder, the US attorney-general, has in recent days said that no decisions would be made that would endanger Americans.
He said on Wednesday that the administration and congress will reach an agreement on how to handle the Guantanamo detainees.
"It is still our intention, and I think we will meet that goal that the president has set to close Guantanamo by late January of next year," Holder said.