This happened shortly after taking off, police said.
Television footage showed a charred tail and wings of the white Fokker 50 propeller plane ripped in half outside the smouldering two-storey building housing several shops.
While two guards at the building were injured, the fact that the crash happened around 4 am meant a worse toll was avoided.
The Somalia-bound cargo plane was carrying khat, the leafy plant chewed as a stimulant in east Africa but banned in many countries across the globe.
Khat is big business in Kenya with vast plantations dotted around the country’s central regions. It is grown and sold legally in much of eastern Africa where chewing the plant is an ancient social custom.
Benson Kibui, Nairobi county police commander, said the plane’s pilot, co-pilot, flight engineer and a loader were killed in crash.
“(So far) we have retrieved three bodies,” Kibui told Reuters.