A court ordered the four men - Mohamed Ahmed Abdi, Liban Abdullah Omar, Hussein Hassan Mustafah, and Adan Dheq - imprisoned until a court hearing next week. All four pleaded not guilty in the court.
Among the charges were harboring a fugitive and illegally registering as a Kenyan. The charges had to be read to the defendants in Somali by a translator.
Authorities have detained dozens of people in the wake of the four-day mall siege, but had not said any suspects were directly related to the attack. It's unclear how many arrests have been made.
The Somali Islamic extremist group al-Shabab claimed responsibility for the attack and said it was in retaliation for Kenya's deployment of troops in southern Somalia.
Abdi, Omar and Mustafah were charged with knowingly supporting Mohammed Abdinur Said and Hassan Dhohullow and others identified as perpetrators of the terrorist attack.
Dheq was accusing of harboring terror suspects. Authorities said a mosque in Nairobi's Somali neighborhood of Eastleigh knowingly harbored Abdikadir Hared Mohammed, a terror suspect.
The four are due back in court Nov. 11.