In the „Dialectic of Enlightenment“, against the background of Nazi-Germany, Horkheimer and Adorno attempt to develop a genealogy of totalitarian systems in general. In a process they see continued and reinforced by the Enlightenment, they discover an emergence of totalitarian thinking. Critically reflecting on what enlightened thinking entails, a thinking which is the foundation of the society in which they lived, they appear anti-foundational. Nietzsche, considered an anti-foundationalist, is crucial for thinkers of Social Theory. Indeed, both were thorough readers of Nietzsche.
Horkheimer and Adorno predate the process of enlightenment long before Kant. They discover as its basic drive the ancient struggle for self-preservation in so far as „human beings have always had to choose between their subjugation to nature and its subjugation to the self.“ . Together with the fear of nature – that „noonday panic fear in which nature suddenly appeared to humans as an all-encompassing power“  – it results in an attempt to liberate oneself by trying to understand nature. They see this attempt Kant-like as „the doubling of nature into appearance and essence, effect and force“ , which had already been taken place in the epoch of myths: it is „ made possible by myth no less than by science“ .
According to Adorno/Horkheimer, in that epoch, in which human traits were projected onto gods, the subject (human as investigator) and the object (nature) were not yet separated. Humans could not yet oppress human nature. They agree with Nietzsche, who sees natural instincts as “human, all-too-human”  traits (for the last time) embraced in Greek mythology: “this … is revealed by the merest glance at the Greek gods, those reflections of noble and self-controlled man, in whom the animal in man felt himself deified” . But whereas Nietzsche only goes so far as to present mythology as life-affirmative, for Horkheimer/Adorno it constitutes humankind’s early attempt to make the world predictable (“Myth sought to report, to name, to tell of origins … therefore also to narrate, record, explain“ ), and controllable (“Each ritual contains a representation … of the specific process which is to be influenced by magic.“ ).
With the Enlightenment humankind has the tools, and the fear of unknown nature starts to debunk the myths: „Humans believe themselves free of fear when there is no longer anything unknown. This has determined the path of demythologization, of enlightenment“ . Now being able to deprive the gods of their power, human’s unleashed urge for domination takes over the process: “Ruthless toward itself, the Enlightenment has eradicated the last remnant of its own self-awareness. Only thought which does violence to itself is hard enough to shatter myths.” 
According to Nietzsche, humans developed the ability of generalizing objects into quantities and calculating via the “principle of equivalence” long before the Enlightenment, Those capabilities have their origin in humans prehistoric relationships to each other as „creditor and debtor“. Nietzsche supposes that from those faculties originates human’s superior feeling towards the animal kingdom: man as the “measuring animal”, equivalent to consciousness. Thinking has become calculating before the Enlightenment, and it possesses the potential for domination.
For Horkheimer/Adorno, these faculties – equating and calculating- play an important in the progress of Enlightenment. The Bourgeois uses them for their predominance: „Bourgeois society is ruled by equivalence. It makes dissimilar things comparable by reducing them to abstract quantities” . Furthermore, “for the Enlightenment, anything which cannot be resolved into numbers, and ultimately into one, is illusion“ . Put differently: qualities become illusions, because illusions are not to be dominated. Expelling the indomitable gives the illusion of total dominance. Enlightened thinking, under the spell of domination, cannot recognize this illusion: it becomes a totalitarian myth.
Domination strives to transform the object into generalized quantities – but generalization goes at the expense of the individuality of the single case. Humans have individual qualities; they do not fit easily into the general mold. Their self has to be reduced to unified entities, by social coercion if necessary: „because that self never quite fitted the mold, enlightenment … has always sympathized with social coercion. The unity of the manipulated collective consists in the negation of each individual“ . Totalitarianism can spread to the social realm.
With science and mathematics, generalization and calculation, Enlightenment possesses the tools of domination. Transferring those tools also to society and law, Enlightenment experiences a regress to an all-encompassing driving force: progress is subjected to the primitive force of domination. Enlightenment, according to H/A reducing and coercing humans and society into calculable, controllable entities, driven by the inexorable “will-to-power”, inevitably ends up in that dialectical state Horkheimer/Adorno diagnose: in two inseparable, parallel processes of liberation over nature as progressive process and violence against human nature as regression. Nietzsche states why separation from animal nature is pernicious: it causes self-inflicted suffering; “man’s suffering from man, from himself, this is a result of a violent separation from his animal past”. 
Both Nietzsche and Horkheimer/Adorno diagnose negative, oppressing forces in the progress of Enlightenment. Whereas for the first, the process merely entails an unhealthy state for the individual and society, the latter discover in it a precarious product: enlightened thinking, able to subsume everything under its paradigm, gives rise to totalitarian thinking and becomes a myth it is unable to debunk by itself.
(1) Horkheimer/Adorno: Dialectic of Enlightenment
(2) Nietzsche, Genealogy of Morals