Sufism, as a social institution, has great importance in the history of Iran. Its principles, rules and teachings refer to special rituals that Sufis have to obey them. Along with political and social changes, Sufism has had its ups and downs, and many tendencies and branches have been formed in it. But for all its breadth, it can be considered as a Foucauldian discourse. By employing analytical-comparative method, the present study seeks to assess the function and structure of power in Sufism based on Foucault's theory of power discourse. The results of the study show that Sufism has a dual function. On the one hand, it creates a kind of public discipline, affects the individual freedom, and its teachings reinforce and establish the propositions of power. On the other hand, it can sometimes expand the scope of general knowledge, challenges, as a rival discourse, the other discourses including the sovereign power discourse. In this way, Sufism can reduce, albeit slightly, the despotism of parallel institutions, especially the sovereign one, by distributing power and wealth.