The German philosopher Walter Benjamin had the curious notion that we could change the past. For most of us, the past is fixed while the future is open. Benjamin thought that the past could be transformed by what we do in the present. Not literally transformed, of course, since the one sure thing about the past is that it does not exist.

There is no way in which we can retrospectively erase the Treaty of Vienna or the Great Irish Famine. It is a peculiar feature of human actions that, once performed, they can never be recuperated. What is true of the past will always be true of it. Napoleon will be squat and Einstein shock-haired to the end of time. Nothing in the future can alter the fact that Benjamin himself, a devout Jew, committed suicide on the Franco-Spanish border in 1940 as he was about to be handed over to the Gestapo. Short of some literal resurrection, the countless generations of men and women who have toiled and suffered for the benefit of the minority - the story of human history to date, in fact - can never be recompensed for their wretched plight.

What Benjamin meant was that how we act in the present can change the meaning of the past. The past may not literally exist (any more than the future does), but it lives on in its consequences, which are a vital part of it. Benjamin also thought this about works of art. In his view, the meaning of a work of art is something that evolves over time. Great poems and novels are like slow-burning fuses. As they enter into new, unpredictable situations, they begin to release new meanings that the author himself could not have foreseen, any more than Goethe could have foreseen commercial television. For Benjamin, it is as though there are meanings secreted in works of art that only come to light in what one might call its future. Every great drama, sculpture or symphony, like every individual person, has a future that helps to define what it is, but which is beyond its power to determine.

In one sense, we know more about the French Revolution or the Stalinist reign of terror than those who were involved in them, because we know what they led to. With the privilege of hindsight, we can inscribe these events in a broader narrative, making more sense of them than Robespierre or Trotsky were ever able to do. The price of this superior knowledge is impotence. There is no way we can use this knowledge to undo past catastrophes. We are like men and women frantically waving at history from a long way off, powerless to intervene in its crises and convulsions.

Yet we are not entirely impotent. It is up to us to ensure that Michelangelo and Thomas Mann, say, did not belong to a race that ended up destroying itself. They themselves, being dead, are powerless to prevent that tragic denouement, whereas we are not. We can make a difference to their stories. We cannot undo the fate of those in the past who fought for justice and were murdered for their pains. But we can rewrite their narratives by our own actions in the present, and even give them a classical happy ending.

In this way, Benjamin thought, we could redeem our ancestors after a fashion. The traditional Judaic rituals of mourning and remembrance could be lent a new twist. For this unorthodox leftist, astonishingly, there could even be something revolutionary about nostalgia. Today, nostalgia is almost as unacceptable as racism. Our politicians speak of drawing a line under the past and turning our back on ancient quarrels. In this way, we can leap forward into a scrubbed, blank, amnesiac future.

If Benjamin rejected this kind of philistinism, it was because he was aware that the past holds vital resources for the renewal of the present. Those who wipe out the past are in danger of abolishing the future as well. Nobody was more intent on eradicating the past than the Nazis, who would, like the Stalinists, simply scrub from historical record whatever they found inconvenient. The past was as much clay in their hands as the future.True power is sovereignty over what has already happened, not just the capacity to determine what will happen next.

In one of his shrewdest sayings, Benjamin remarked that what drives men and women to revolt against injustice is not dreams of liberated grandchildren, but memories of enslaved ancestors. It is by turning our gaze to the horrors of the past, in the hope that we will not thereby be turned to stone, that we are impelled to move forward.

Benjamin was greatly interested in the work of a fellow Jew, Sigmund Freud, who also saw remembrance as the key to emancipation. In Freud's view, human beings are naturally amnesiac animals. It is forgetfulness that keeps us going. We survive only by repressing a great deal of unpleasant material from our past. For Freud, it is oblivion that is natural to us. Remembering is just forgetting to forget. It can be an extraordinarily painful process, which is one reason why we tend to avoid it.

There is a parallel here between individuals and nations. Nations sometimes flourish by denying the crimes that brought them into being. Only when the original invasion, occupation, extermination or usurpation has been safely thrust into the political unconscious can sovereignty feel secure.

It is enslaved ancestors, as Benjamin calls them, whom Barack Obama has in his keeping. He may not himself be a descendant of slaves, but he is a child of the continent from where they were shipped. Obama is not especially keen on advertising this fact, given his scrupulously crafted "post-racial" persona. We can certainly expect little from his administration in the way of real change. The US will remain a one-party state, whatever name the capitalist party happens to go under. Even so, with a black man in power, the country still has within its grasp a momentous opportunity to redeem its dead. It has a chance to write an unexpected epilogue to the sordid tale of slavery and racial conflict.

This does not mean that all's well that ends well, as Shakespeare seems to have thought. Tragedies are not converted into comedies simply by being given a few upbeat closing lines. In fact, most of Shakespeare's own happy endings deliberately include some dissident element, some joker in the pack who refuses to be incorporated into the final resolution.

Obama's victory does not make up for America's horrific racial past. The lynched, castrated and humiliated of earlier times can be granted no literal redemption. Our more optimistic ancestors sometimes thought of history as a kind of train, pulling us up from the dark valleys to the sunlit uplands. But if history is a train, then we need to commemorate those who never arrived at their destination - those who died in the sidings or jumped despairingly on to the tracks.

Even so, the comic turn of events that sent Obama to Washington serves to show that history, however tragic, is not destiny. What happens, happens. But as Benjamin's friend and colleague Bertolt Brecht never ceased to remind us, it could always have happened differently, or not happened at all. Among the things that make up history are the things that did not happen, or did not need to happen, which often exert as profound an influence on the course of events as those that did.

Looking back from the standpoint of Barack Obama's White House, we can see more than the 19th-century slave-owners of the American deep south could. We can see that slavery did not need to happen because, one day, an African American would be president, thus finally putting paid to the myth that his people are inferior.

This retrospectively rewrites the nation's narrative. But at the same time, it reminds us of an intolerable outrage: all that suffering and wretchedness was, in the end, for nothing. As Brecht said: "This man's sufferings appal me because they are unnecessary."

Terry Eagleton's landmark study "Walter Benjamin: or Towards a Revolutionary Criticism" has been republished by Verso (£6.99) in its Radical Thinkers series.

Terry Eagleton will take part in the panel discussion "Don't Look Back: Radical Thinkers and the Arts Since 1909" on 26 November at Tate Britain, London SW1