Their releases came a year to the day after the attack on the Paradise Hotel in which 18 people were killed.
Justice Kaplana Rawal on Friday ordered the release of Faiz Abd Allah Shariff and Muhammad Ali Hassan, two of the nine suspects, after the state prosecutor withdrew charges against them.
"The proceedings of the hearings of this case have been terminated and the accused persons are free to go," Rawal said.
"The attorney general, after evaluating the evidence in totality and taking into account the fact that investigating terrorism takes a long time and in view of the faceless nature of the people involved, it has been found necessary that the charges against the accused persons be withdrawn," prosecutor John Gacivih said.
Murder charges dropped
In total nine suspects had been charged with murder. The state also reduced the charges, from murder to conspiracy to commit a felony, against three others accused in the bombing: Muhammad Kubwa Saif, Said Saggar Ahmad and Salmin Muhammad Khamisi.
"This is being done strictly in view of the evidence available. The three will be charged with conspiracy to commit a felony in a lower court," Gacivih said.
Four others, Umar Said Umar, Muhammad Kubwa, Aboud Rogo Muhammad and Muhammad Ali Saleh Nabhan were charged afresh on 15 counts of murder over the bombing.
The four pleaded not guilty and Rawal set their hearing "from January 26, day to day, to February 26."
Twelve Kenyans, three Israelis and three presumed bombers died in the attack.
US embassy bomb plot
Meanwhile, three suspects were also charged with conspiring to blow up the US embassy in Nairobi, a plot that had not hitherto been revealed.
In a previous attack in 1998, bombers mounted almost simultaneous attacks on the US embassies in Nairobi and Dar es Salaam, Tanzania, killing more than 200 people.
The court chargesheet showed the men were accused of
conspiring to bomb the US embassy in Nairobi in 1998, conspiring to shoot down an Israeli airliner last November and conspiring to bomb the US embassy between November 2002 and June 2003.