This article examines the discussion of core Islamic rituals in the writings of the influential eighteenth-century Sufi, hadith scholar, and jurist Shah Wali Allah of Delhi (d. 1762). It brings out the implications of Wali Allah's sustained concern with demonstrating how divinely mandated rituals serve human interests, not just at the individual but also at the societal and political levels. This aspect of Wali Allah's thought has parallels with how many modernists and Islamists in colonial and post-colonial South Asia have sought to explain Islamic rituals in terms of their social ramifications. But there are some significant differences between them, too, and these help shed further light on Wali Allah's distinctive theory of ritual.