Your question seems to imply that kingdoms or polities can't exist without some kind of direct land access to the sea. While access to the sea and its resources, or trade via sea routes, are both valuable, you'll find that many people live in places far from a coast and will make use of what resources are available to them to create societies and gain power; examples include the Mongols and the Czech Republic.
However, the area around which the Kingdom of Mali formed initially, in the modern-day country of Mali, where civilization revolved around an influential and rich waterway that wasn't the ocean, the Niger river. The Niger acted as a conduit for trade, a source of fresh water, and a source of food (as well as mud, reeds, and other riverine resources). The region in now southern Mali was home to many powerful cities, such as Djenne, Gao, and Timbuktu. Mali was nominally founded by Sundiata Keita, and eventually had its capital at Niani. Through war, Mali came to encompass a large portion of West Africa. It was famously wealthy, thanks to plentiful trade (both along the Niger with other West African groups, and north through the Sahara with Tuareg and Berber groups) and to its immense gold fields, especially Bambuk and Buré. It's estimated that a quarter of the Old World's gold was from these mines.