The great polemicist is certain to be remembered, but perhaps not as he would like.

"Nothing concentrates the mind more than reading about oneself in the past tense", quipped Christopher Hitchens on discovering that his death had been prematurely announced by the National Portrait Gallery. A catalogue previewing an exhibition entitled "Martin Amis and Friends" had included a photograph of the polemicist, erroneously captioned, "the late Christopher Hitchens". A month later, he was diagnosed with inoperable cancer, lending his words a haunting new resonance.

Hitchens, who is being treated at the M D Anderson Cancer Centre in Houston, Texas, is still very much alive, but anyone misled by the National Portrait Gallery could have mistaken an event one recent evening at the Royal Festival Hall in London for a memorial service. It was originally billed as a conversation between Hitchens and Stephen Fry, but Hitchens, now afflicted by pneumonia, was too unwell even to appear via video-link on 9 November. He has not visited London since May 2010, when I interviewed him for the New Statesman, and fears he will never see the country of his birth again.

Rather than cancel the event, the organisers assembled an extraordinary selection of Hitchens's comrades and friends to pay tribute to him. Richard Dawkins, Hitchens's fellow anti-theist, joined Fry on stage, while Amis appeared on a video-link from New York, as did James Fenton and Salman Rushdie.

The line-up also included the actor Sean Penn (with whom Hitchens plays pool), the former Harper's editor Lewis Lapham and the novelist Christopher Buckley, son of the conservative intellectual William F Buckley, with whom Hitchens often debated. It felt like a hyperintelligent version of Question Time.

McEwan and friends

Wreathed in clouds of smoke and looking as if he had just climbed out of bed, Penn opened proceedings, discussing the political significance of The Trial of Henry Kissinger - Hitchens's 2001 account of the former US secretary of state's "one-man rolling crime wave" - until the satellite link failed ("God damn you, Google!" cried Fry). But the most significant interventions came from two figures who did not appear that evening.

The first was from the novelist Ian McEwan, who watched the event online with Hitchens and his wife in Texas. "I talked until late last night with Hitch; we were discussing the non-communist left of the early 1950s," he wrote in an email read out by Fry. "He can't run a mile just now but be reassured his Rolls-Royce mind is purring smoothly." The truth of this statement will be clear to anyone who has read Hitchens over the past year. The series of essays he wrote for Vanity Fair about his illness stands as the finest writing on the subject since John Diamond's C: Because Cowards Get Cancer Too. Without a hint of self-pity or sentimentality, Hitchens confronted his fate with pure reason and logic.

"To the dumb question, 'Why me?'" he wrote, "the cosmos barely bothers to return the reply: 'Why not?'" Nor has his humour deserted him. To a Christian who insisted that God had given him "throat" cancer in order to punish the "one part of his body he used for blasphemy", he replied: “My so-far uncancerous throat . . . is not at all the only organ with which I have blasphemed."

The second notable intervention came from Hitchens himself. "More Bosnia, less Iraq," he wrote in a text message to Fry. It felt as if he was trying to edit his own obituary. As he told the New Statesman, though he is unrepentant about his support for the invasion of Iraq and believes that history will vindicate him, he does not want to be "defined by it". His reference to Bosnia was an attempt to place his support for the war in the context of a wider commitment to anti-totalitarianism. It was also a reminder that he supported a war that saved Muslim lives, rather than ended them.

Hitchens was already preoccupied with his legacy when I interviewed him. He spoke of his desire to write a memoir before it was "too late", almost as if he knew even then that something was wrong. Now, as he prepares for death, he is determined to ensure that he is not remembered simply as a "lefty who turned right" or as a contrarian and provocateur. Throughout his career, he has retained a commitment to the Enlightenment values of reason, secularism and pluralism. His targets - Mother Teresa, Bill Clinton, Henry Kissinger, God - are chosen not at random, but rather because they have offended one or more of these principles.

The tragedy of Hitchens's illness is that it came at a time when he enjoyed a larger audience than ever. Of his tight circle of friends - Amis, Fenton, McEwan, Rushdie - Hitchens was the last to gain international renown, yet he is now read more widely than any of them. The great polemicist is certain to be remembered, but, as he is increasingly aware, perhaps not as he would like.