The article is about an evolution in the ideas of the social contract in such works by M.A. Bakunin, as “Confession” (1851), “Federalism, Socialism and Antitheologism” (1867), “Statehood and Anarchy” (1873). Based on primary sources, the author shows the intellectual evolution of the thinker from criticism of the idea of social contract to the idea of federalism. Bakunin considered the weak point of the theory of social contract to be the replacement of the concept of “society” with the concept of “state”, while the state not only puts itself above society, but also tries to absorb it. He highlighted those features of the state that do not allow concluding a social contract with it; the denial of the individual freedom; pressure on the free will of the individual by collective power; distortion of the natural relationship between good and evil; replacing religious morality with secular (atheistic) morality. The idea of a social contract by M.A. Bakunin contrasts the idea of federalism. The thinker’s views about the concept of “federalism” also changed: if until the mid-1860s. it was a form of state arrangement (“Slavic” or “European” federation), then by the end of the 1860s the concept of “federation” acquired the meaning of an alternative way of social organization, freed from power of any kind. Ultimately, he came to the conclusion of free organization, an ascending hierarchy representing a set of alliances for creating a universal world.