Because it is on the coast, East Africa had contacts with India and Egypt and West Asia, and even with China, long before other parts of Africa did. The earliest written evidence we have about East Africa comes from a Roman guidebook for sailors. That’s the Periplus of the Erythraean Sea. Somebody wrote it, in Greek, about 50 AD. This guidebook describes a number of East African ports, although probably only as far south as modern Kenya. Traders were already buying enslaved men and women from Ethiopia and Kenya. They sold them north in the Roman Empire.
There is archaeological evidence for a port around 700 AD at Shanga, in modern Kenya. There were only a few people living there. They seem to have kept cattle. Some archaeologists think the people of Shanga had already converted to the new religion of Islam by the 800s AD, although the evidence is not very clear. But they were certainly building an Islamic mosque by the 900s. Sometime around this time, the people of East Africa also began speaking a Bantu language. It became known as Swahili (swah-HEEL-ee).
By the 1000s AD, many of the coastal ports of East Africa were involved in trade with the Fatimids in Egypt and the Abbasids in West Asia, and also with Muslim India. Many of these African ports, to make trade go more smoothly, were minting gold, silver, and copper coins. And Fatimid dinars from before 1066 AD have been found at Mtambe Mkuu in modern Tanzania. Mostly the African ports sold gold and furs from central Africa, ivory, and rock crystal. In return, they bought glass beads, Chinese porcelain, and Indian steel and cotton cloth.
In 1320 AD or so, the African ruler of the port of Kilwa (in modern Tanzania), al Hasan ibn Suleiman, built himself a great stone palace out of cut coral. The great North African traveller and writer ibn Battuta visited al Hasan there. By 1500 AD, however, Europeans from Portugal had begun to take over the East African ports, which gradually pushed out Islamic and Indian influence.
East Africa by Cynthia L. Jenson-Elliott (2002)
City-States of the Swahili Coast (First Book) by Thomas H. Wilson (1998)
Kings and Queens of East Africa, by Sylviane Anna Diouf (2000)