Friedrich Nietzsche heralds the "death of God" poetically in his Zarathustra book of 1884, and returns to it as a philosophical dictum in The Antichrist (1888). By philosophical I mean this wasn't an atheist broadside against belief and believers of the kind we've become accustomed to in our own time – or, not only. It was an attack on the tight association of reason and divinity, which had begun with Plato and carried through the Christian tradition until René Descartes in the 17th century.

In Descartes's "first philosophy" the subject must doubt any "truth" available to him in the world, unless he can prove it rationally. Descartes finessed his method with six proofs of God ensuring reason's access to truth. But his peers could see that whether or not God existed was irrelevant to the new scientific method.

However, while Descartes's scientific revolution and the Enlightenment – which established rationality as the driving force of general culture – pushed God out of the picture in France (and, with David Hume, in Britain too), in Germany, where a unique kind of philosophy emerged at the end of the 18th century, God still headed up systematic explanations of man and nature and the meaning of life. A version of God made the great systems of Hegel and Schelling, known together as German idealism, possible.

Nietzsche, as a mid-19th-century German philosopher, first declared God dead in the context of this idealism. He might just as well simultaneously have declared "reason" dead. Indeed, he did just that. For reason, in the idealist context, was not just some capacity of mind to prove propositions about experience true; it was, for Hegel, a supernatural force out there, moving the world towards progress. Nietzsche's rebellion was a way of saying that no great metaphysical forces governed human life and created a framework for meaning, every individual faced the possibly absurdity of existence alone. Yet this was hardly the only meaning of his "death of God".

Nietzsche was as much a German writer as he was a philosopher. His father, who died when he was four, was a Protestant minister, and Nietzsche was brought up in an atmosphere of gloomy Lutheran piety by his mother and sister. It was against the oppressive weight of Christian moralising on his sensual being that he passionately rebelled; and this rebellion was fired all the more by chronic illness, which further limited his chances to love life.

To this personal rebellion must be added a Nietzschean fury with the condition of a Germany newly united under Bismarck, who was pursuing an official "cultural struggle", a kulturkampf, to unify German culture as Protestant and national. Nietzsche despised the church as an institution and politically and culturally he was a free-thinking European far ahead of his days.

So, "God is dead": you, men of power, can't take his name in vain to shore up your institutions. That would be the political message.

So, "God is dead", which means "Reason" with a capital R, the force out there that made possible the philosophy of Plato, of the intertwining of Reason and divinity throughout mainstream Christianity and western philosophy, cannot be used to explain the nature of "man". But that means that man, too, is dead. In fact, the most serious outcome of Nietzsche's death of God is the death of man, or mankind, as one entity, defined by rational capacity and slotted into a vision of "rational" progress.

So, "God is dead", but that means, for Nietzsche, on the plus side, that the body is free. And the place where you need to look for how to respond in Nietzschean style to the death of God is back to his Die fröhliche Wissenschaft (1886), which I would translate as "The Science of Joy". Here's a taste from the second preface Nietzsche wrote to it:

"The unconscious disguise of physiological needs under the cloaks of the objective, ideal, purely spiritual goes to frightening lengths – and often I have asked myself whether, taking a large view, philosophy has not been merely an interpretation of the body, and a misunderstanding of the body."

Book three contains dicta such as "Prayer has been invented for those people who really never have thoughts of their own and who do not know any elevation of the soul …" and "The Christian resolve to find the world ugly and bad has made the world ugly and bad". God is dead now moves towards the idea that each man must reinvent himself as a connoisseur of that very joy in living, which Christianity repressed.

So, God is dead: the awfulness of men killed him – this is a theme, and the spirit of, much of the Zarathustra book. It makes the message mournful, too.

Against it the explosion of playfulness in The Science of Joy sets humanity the – perhaps impossible – task of complete self-reinvention in order to live truly here, in this world.

The context in which this reinvention had been taking place since before Nietzsche was "materialism", which, in the philosophical sense, was the position opposite to the idealism of Hegel and Schelling. Ludwig Feuerbach set it out in the 1830s, and this, as is well known, gave Marx his philosophical starting point.

This is not to say Nietzsche is a Marxist. Far from it. But it means that even his thinking did not come into being ex nihilo. He was carried forward on the most radical spirit of the times in which was born, and which he lived through in his own way: as a German writer, as an anti-idealist and an anti-Christian. The title of his book Der AntiChrist, in German, means "Anti-Christian" just as much as it means "Antichrist".

The other narrative that already in the mid-19th century told the western world God had died was, of course, Darwin's. Nietzsche was not part of post-Darwinism, but what he had to say fed into the 20th-century "after God" cultural steam.

Most important when we consider him in the context of today's atheists is to remember that he didn't elevate reason to a god either, and that his involvement in the spiritual tradition he was trying to leave was intense.

• Follow Comment is free on Twitter @commentisfree