They were both acquitted on charges of murder and other inhumane acts, while Fofana, as the war director and second in command of the CDF ranks, was cleared of conscripting child soldiers.
Along with the government army, the CDF fought the Revolutionary United Front (RUF) in a war that claimed, according to UN estimates, about 120,000 lives.
The international tribunal in Freetown, Sierra Leone's capital, was created in January 2002 by a treaty between the Sierra Leone government and the UN.
The court is charged with prosecuting those responsible for atrocities committed during the war.
The fighting in Sierra Leone began in 1991 when Foday Sankohm, an ex-army corporal, and his RUF group took up arms against Joseph Momo, president at the time.
RUF fighters were popular at first, but they earned a reputation for murder, rape, mutilation and recruiting child soldiers.
The conflict was funded partly by diamonds mined in southern and eastern Sierra Leone, which, once-publicised, led to a global campaign against so-called "blood diamonds" mined in conflict zones.
In 1997, the Armed Forces Revolutionary Council (AFRC), a group of army officers allied to the RUF fighters, overthrew Ahmad Tejan Kabbah, the elected president, but a Nigerian-led regional force reinstated him within a year.
A truce was agreed in 1999 after heavy fighting in Freetown, but it fell apart in 2000.
Disarmament was completed with UN assistance in 2002 and the conflict was formally declared over.
Kabbah was re-elected in May 2002 and the RUF, standing as a political party, won little support in the ballot. Sankoh died in prison in 2003 while facing a war crimes indictment.
The toll from the war is estimated at 50,000 in a country that has a population of about six million people, and was placed second from bottom in the 2006 UN Human Development Index.