Grenades were thrown at La Chaumiere restaurant in the capital of the Horn of Africa country, officials said. At least another 11 people were wounded.
Unconfirmed reports said that two employees had been killed and several foreigners wounded.
No group has said it carried out the attack and the motive was not immediately clear.
Colonel Omar Hassan, head of police in Djibouti City, told Reuters: "It's a criminal act. We have two people dead and 11 wounded. It was grenades."
Djibouti's ADI news agency reported several explosions around 20:00 local time (17:00 GMT) and said that the area was quickly sealed off by police.
Djibouti, a former French colony, is home to US and French military bases and also contributes troops to the African Union force fighting al-Shabab militants in Somalia.
Its port is also used by foreign navies protecting the Gulf of Aden's shipping lanes from Somali pirates.
At least two people have been killed in an attack on a restaurant popular with Westerners in Djibouti, police say.