Clambering out of a taxi in Edinburgh the other day, Menzies Campbell was greeted at his garden gate by a passer-by who told him how well she thought he was looking, a delicate reference perhaps to his freedom from the mauling he had endured for 18 months as Liberal Democrat leader.

And it's true. Ming Campbell, former Olympic athlete and target of brazenly ageist abuse, does have a renewed spring in his step. He had left London that week on a high. His reputation for being the one senior politician who, from the beginning, had read Iraq exactly right, was reinforced by the government's sudden announcement that America had indeed misled the UK by denying that "extraordinary rendition" flights had touched down on British territory. Diego Garcia, little more than a refuelling stop in the Indian Ocean, had proved the vindication of Campbell's robust insistence that on the transfer of prisoners to countries low on human rights, the US must be held to account.

So, Campbell-bashing is past tense. Able again to concentrate fully on foreign affairs, he's back on form. In which case, one wonders if he won't come to regard his trenchant stance against the calamity of the Iraq war as a more significant contribution to British politics than his fraught term of political leadership.

Relaxing in his handsome Edinburgh home, Campbell sits back in a chair, his expression, just for a moment, slightly quizzical. "I think the implication behind your question is that I was dissatisfied with leadership," he says. "Well, that gets us into the quite profound area about why people go into politics. Most of us do it because we have an ambition to advance the cause of the party to which we belong. That's certainly the purpose of leadership, but much of what I did was taken up with binding the party's internal wounds because of the circumstances that surrounded Charles Kennedy's own departure as leader."

In his new memoir, My Autobiography, Campbell writes candidly but not insensitively about this beleaguered period. So, did he have reservations about revisiting in print such an anguished episode?

"Yes, strong reservations but, as part of the unfolding story, it was necessary to put it in some kind of context. However, there are things about it, and my time as leader, which I have deliberately kept out because it would be inappropriate to talk about them." Campbell, whose first vocation was the law, doesn't elaborate beyond saying, rather cryptically: "Where I thought it would be unduly damaging, I have exercised discretion."

And what of the wounds inflicted on him by certain politicians and media who, in their determination to trash Campbell, used his age - 65 at the time - as a handy assault weapon? How hurt was he by such sustained attacks? "Not hurt but - if you'll forgive the expression - pissed off. It was the political journalist Ian Aitken who said that politics was a rough old game. And that's absolutely right. But, actually, I was irritated and frustrated at not having to fight a General Election because I feel that taking on Brown and Cameron would have played to my strengths in rational argument."

Later in our conversation, he muses that perhaps it's naive to hold "this rather fond view" that the force of argument will always prevail. "I suppose that's my lawyer's background, but there's no question that there were bits of being leader which I enjoyed immensely." Bits, such as running the shadow cabinet, he says. "And driving the party into the twentieth century, if not the 21st."

What puzzled outsiders, however, was how fast those who had always admired Campbell's stature and decency turned into a jeering mob. Cartoons mocked him as the Olympian figure with a zimmer frame, and Jasper Gerard, a former speech-writer for Campbell, observed: "I grew weary of denying to fellow journalists that Ming took naps in the afternoon, or even that he wore sock-garters; for the record, he simply liked long socks of the sort one finds in Jermyn Street."

Why did he come in for such spiteful trouncing? "I had some difficult times at the start. There's no getting round that," he says, referring to the weekly bear pit of Prime Minister's Questions. "But we did a helluva lot of work rehearsing for that." In the Commons, the leader of the third party is always at a disadvantage because he doesn't have the prop of a despatch box, so Campbell needed to acquire some stagecraft. To some extent, he achieved this simply by taking off his spectacles and waving them in his right hand for emphasis.

"And I think I was getting better at those occasions. But from the beginning Labour and the Tories set out to barrack me. Blair, the supreme artist at Question Time, wasted little opportunity in having a real go at me, and he and I were friends." Are they still friends? Campbell gives a rueful smile. "I suppose we may come back to being friends."

Yet if Campbell accepts that politics is a rough old game, there is also a deeper reason why he is philosophical about the viciousness which undermined him.

"In politics you see fortunes rise and fall, and you realise just how fragile it all is. But when someone tells you that you've got cancer, there isn't a blinding flash of revelation. Instead, over those punishing months of chemotherapy and radiotherapy, there's a different slant on life. And if you are one of the lucky ones to come through all that, then every day is a bonus compared to what might have been."

Towards the end of 2002 Campbell was diagnosed with non-Hodgkin lymphoma. A sprint finalist in the 1964 Tokyo Olympics, he was once the fastest man in Britain and that provenance of fitness gave him a general level of health which would now help him through one of the most severe treatment regimes. But anyone with experience of cancer can't fail to identify with the terror he expresses in My Autobiography, as he and his wife, Elspeth grappled with the impact of the illness.

As much as his book is the story of a political journey, it is also a testament to Elspeth's strength and devotion, and to the quality of care which he and his fellow patients received from the NHS.

"But absolutely nothing prepares you for that moment when you're told it's bad news. In my case, I was in an office in the basement of the old Edinburgh Royal Infirmary, and to this day I remember the nurses' shopping bags on the floor, a stack of fax rolls in the corner, and people's raincoats on hooks on the wall. In the midst of these banal surroundings, the doctor was saying that the tumour on my hip was cancerous."

Campbell felt an explosion of sweat, and twice he nearly fainted. But he declined the hospital's offer of transport and instead walked, in shock, out into the rain to call Elspeth. "She was at the checkout in Safeway, and I just said, I've got cancer.' She was so stunned, I could hear her say, My husband's got cancer' and the checkout girl, trying to offer comfort. It was freezing and wet, and, curiously, I don't know what happened in the next 20 minutes but it was as if Elspeth had reached me in seconds."

Back home, they hugged each other in the hallway. "And she said, Don't leave me yet.' Our closest friends reacted with magnificent kindness and understanding. But in a sense Elspeth and I turned inwards to support each other during those months. She was quite extraordinary."

Once in remission, Campbell became deputy leader in 2003, and he only realised the full extent of Kennedy's problem after being briefed by Anna Werrin, "effectively the gatekeeper to Charles's office". He writes: "I started to make sense of the past four years; why Charles's office had so quickly thrown a wall around him after he became leader; why he seemed so remote from his MPs."

By December 2005 more than one-third of the parliamentary party threatened to resign their portfolios if Kennedy didn't quit the leadership in a matter of days, and on January 7, 2006, he complied. Campbell notes: "Charles's resignation statement was dignified, good-humoured and free from rancour. It had been forced on him but he did it with grace and elegance."

Why did it take so long for senior party figures to confront Kennedy and try to steer him towards professional help? "Some of the criticisms about our reticence are well-judged but we accepted his assurances that he would sort himself out. In these situations, with every promise that it will never happen again, you pray it won't, even if you fear it will. I know this, because my father was a heavy drinker. But we in the party were pulled in a whole variety of ways. Pulled by affection, admiration and respect for Charles, and pulled by anxiety for him, his family and for the Liberal Democrats."

Campbell resigned as leader last October, one month after informing journalists that he couldn't envisage any circumstances in which he would bow out. At the party's annual conference in August he had received a standing ovation, but in the half-dozen interviews that followed, almost every question was about age, and even after a brilliant performance on BBC's Question Time, when Campbell held the audience all the way, the attacks kept coming.

So, on that Monday when he rang to tell Elspeth that he was resigning immediately, was it the impetuous act of a man who, tired of seeing that careworn face in the shaving mirror, just says: "To hell with it"?

"We'll, as soon as Gordon finally decided against a General Election, I thought, If it's not until 2010, I'll be 69. Can I take all this negative stuff for another two years? Can the party?' One of my closest advisers said he didn't think I'd ever manage to trade out of it because the thing about age is that it doesn't get any less." Which is why Menzies Campbell is watching with particular interest the marathon of a certain American politician, a 71-year-old called John McCain. My Autobiography by Menzies Campbell, Hodder and Stoughton, £20.