West Africa carries two large religious systems that have been in contact for a thousand years, and neither displaced the other.
The first is indigenous, and although its forms vary greatly between peoples it shares recognisable features across the region: a creator who is real but distant and rarely approached directly, a working population of deities and spirits associated with particular forces, places and lineages, ancestors who remain active members of their families, and specialists who diagnose misfortune and prescribe remedy. Divination is central rather than peripheral, and the Ifa system of the Yoruba, with its two hundred and fifty six figures each attached to a body of memorised verse, is the most elaborately documented example anywhere in Africa.
The second is Islam, which crossed the Sahara with trade from around the ninth century and was adopted first by rulers and merchants. The empires of Ghana, Mali and Songhai built on that: Mansa Musa's pilgrimage to Mecca in the fourteenth century made Mali famous in Cairo and beyond, and Timbuktu and Djenne became centres of teaching with substantial private manuscript libraries, many of which survive.
Christianity arrived later and mostly along the coast, with missions following European trade and expanding rapidly in the nineteenth and twentieth centuries. The result is a region where the Sahel is largely Muslim, the coast largely Christian, and the older layer present in both.
Sources West African Traditional ReligionKofi Asare Opoku with Corpus of Early Arabic Sources for West African HistoryNehemia Levtzion and J. F. P. Hopkins (eds.)