The seventeenth century was a period of major social change in central sudanic Africa. Islam spread from royal courts to rural communities, leading to new identities, new boundaries and new tasks for experts of the religion. Addressing these issues, the Bornu scholar Muḥammad al-Wālī acquired an exceptional reputation. This study places him within his intellectual environment, and portrays him as responding to the concerns of ordinary Muslims. It shows that scholars on the geographical margins of the Muslim world participated in the debates in the centres of Muslim learning of the time, but on their own terms. Al-Wālī’s work also sheds light on a century in the Islamic history of West Africa that has until now received little attention.