THERE was one notable absence at a recent reception at Bute House, the first minister's official residence, hosted by Alex Salmond to mark the republication of John MacCormick's The Flag In The Wind. The book is an account of the SNP's formative years by one of the party's founding members and galvanic leaders, and the event was a moving celebration, attended by MSPs, junior ministers, Cabinet members and several venerable figures in the Nationalist movement. Guests included Billy Wolfe, a former party leader, Winnie Ewing, whose 1967 victory at the Hamilton by-election is regarded by many as one of the most important stepping stones towards devolution, and Ian Hamilton QC, one of the notorious quartet who, on Christmas Eve, 1950, recovered the Stone of Destiny from Westminster Abbey.

But conspicuous by his absence was John MacCormick's son, Neil, a former SNP MEP, a distinguished academic, one of the country's foremost constitutional lawyers and, of late, a much-valued special adviser to the first minister. A few months ago, Neil MacCormick was told he has a terminal cancer and has only a short while to live. Nevertheless, he agreed to grant the Sunday Herald an interview at his Morningside home, to which he is now confined.

No attempt is made to camouflage the gravity of his illness. His wife Flora, while acknowledging that we are all in life's exit lounge, says that the difference where her husband is concerned is that he knows more precisely than most what the departure time is likely to be. Dressed in a cardigan and a check shirt, his mind as sharp as a dirk, MacCormick does not look like a man whose days are numbered. One blessing of his type of cancer, he says, is that he's not in pain. The downside is that there is no escape. He knows he will die, and sooner rather than later.

But he is not raging against the dying of the light. "What's the point of moping and cursing your fate?" he says. Nor is he angry. "With whom? God?" Rather he is disappointed at having been robbed of the chance of sharing a long retirement with Flora. "We always wanted to go to Barra," he says, "but we won't get there now."

The first sign of his illness came on February 1, the day he retired. Born in 1941, MacCormick's CV is testimony to an illustrious career in academe while also seeking to realise his father's dream of independence. He became a vice-principal of the University of Edinburgh and has received five honorary doctorates. He became an MEP in 1999 and was knighted in 2002 in recognition of his academic achievements.

Illness was one of the reasons behind MacCormick's decision not to stand for re-election to the European Parliament in 2003. But having successfully fought off cancer once, he could be forgiven for thinking he was cursed when it returned. On the day of his retirement, he recalls: "I had a sort of funny episode eating." Flora insisted he see his doctor, who sent him for tests, which initially were inconclusive. A CAT scan revealed the couple's worst fears: he has a rare form of cancer, of the outside of the stomach, which doctors say is untreatable. "We can alleviate it," MacCormick was told. "We can palliate with chemotherapy, but we can't operate."

"So," he says, "it's been a developing learning curve, starting in February and working through the summer. These things happen."

He seems remarkably sanguine. "I don't honestly see any purpose in being otherwise," he says brightly. "Death comes to us all and it is not in itself something to be afraid of. It's something not to be in a hurry about. I'm not in a hurry but it's in a hurry with me. And also my other deep conviction is that death is hellish for the survivors, Flora in particular. She looks after me heroically. Flora and I have a joint life and we looked forward to a joint retirement. If somebody's cheated, she's cheated, and I didn't cheat her. It's not even one of those cancers that is lifestyle related. Or if it is, nobody's the faintest idea what aspects of your lifestyle might have changed. Things come out of left field."

The timing, though, could perhaps be better. When former SNP MP Douglas Henderson was dying, he told his partner, fashion designer Betty Davies, that "I have failed", because independence would not be realised in his lifetime. It is not a sentiment MacCormick feels comfortable with.

"I'm sorry I won't probably be here to see it," he says, "but I don't share Douglas Henderson's view. We've all been staging posts in a long march and I've no doubt the long march will continue.

"I get some strength and comfort from my dad's book. He has this great statement at the end, declaring that there will be a Scottish parliament opened with ancient pomp and circumstance long before the end of the century. Well, it wasn't long before but he got it right. I think the history of nationalism has always been one of moving from neep tide to spring tide; each tide is a little higher than the one before."

Unlike his father, MacCormick never suffered professionally for his "outré political views". John MacCormick, who was also a lawyer, founded his own firm while pursuing the cause of independence. Though not directly involved in the return of the Stone of Destiny, he gave the plotters his blessing and played a "cloak-and-dagger" part when it was returned to Scotland. Even more earth-shattering was the successful legal challenge he and Ian Hamilton launched in 1953 to prevent Queen Elizabeth describing herself as the "second" of Great Britain.

For John MacCormick personally, the victory, however sweet, proved Pyrrhic. "These adventures," concedes his son, "in the end cost him his partnership in the firm Stewarts Nicol and MacCormick and Co, which he had founded originally on his own." His attempt to be admitted as an advocate at the Scottish bar in Edinburgh was likewise rejected. "Some commentators and historians have written slightingly of MacCormick in comparison with other figures in the national movement," reflects his son. "It seems doubtful, however, if any of the others paid a price in terms of personal fortune remotely equivalent to that he paid for following his voice."

John MacCormick died in 1961, broken - as Ian Hamilton has said - in health but not in spirit, humiliated by his peers and jobless, the penalty for attacking royalty. "I was young and would survive," said Hamilton, "but John was middle-aged with a family. The great and the good feared him as a danger to their mediocrity. They smothered him to death."

If his son does not use such emotive language to describe what happened to his father, it is because he prefers to view things from a historical perspective. "On the one hand, it's a personal tragedy," he says. "But if you take the long view, the end is a triumph. It Holyrood didn't happen in his lifetime. It didn't happen by his direct agency. But it happened in a way in which his agency was not irrelevant. Only people who are willing to make big sacrifices are apt to make big changes in the public's mind and attitude."

Among those, MacCormick would include Alex Salmond, whom he's known since he was a professor at Edinburgh and Salmond was a student at St Andrews. It was the last time he got to patronise him, he jokes. His assessment of the first minister is summed up thus: "Cometh the hour, cometh the man." Lately he has come to know Salmond, who has visited him on a couple of occasions, better as an individual. "He's a man who believes in taking a risk and going for it." Doubtless Salmond will regret not having MacCormick's formidable intellect and counsel to draw on if independence becomes a reality. Independence, says MacCormick, is the relatively easy part. Disentangling Scotland from England constitutionally is a much thornier business and where his expertise would have proved invaluable.

Not that such matters preoccupy him now. He had, he says, more unfinished business in academe than he did in politics. In August, ahead of schedule, he delivered the last of four books commissioned by Oxford University Press. Then he was asked to contribute an introduction to his father's book, which he managed to do. The family history he'd always wanted to write must remain a pipedream but his cousin Donald MacCormick, formerly of Newsnight, has recorded on tape what he hoped to put on paper. All of which gives Neil MacCormick a sense of satisfaction, which he recounts with little hint of sadness or regret.

"There we are. That was my life. One can be very pompous about one's sense of destiny. If I was sent to do anything, I've done what I was sent to do. And I consider myself lucky to have had all the opportunities and have largely had the opportunity to fulfil them. I'm sorry not to have longer to go on but people who get the job done have nothing to complain about."

The Flag In The Wind is published by Birlinn, £7.99