The title of Lance Armstrong's acclaimed autobiography is It's Not About the Bike. But it most certainly is. The American cyclist's relationship with his bike is at the centre of the extraordinary story that saw him recover from a near-fatal cancer to become a sporting hero.

Barring a freak accident, this weekend the five-times Tour de France winner is expected to have claimed a record sixth victory. But he is not just a sporting legend. He is a medical legend, too.

Many people have made remarkable recoveries from cancer and some of them have gone on to sporting success. But none can match Armstrong's trajectory from death's door to the peak of sporting achievement.

It is the extent of his recovery that is remarkable. The testicular cancer with which he was diagnosed in 1996, when he was 24, was already advanced because he had assumed the swelling was caused by cycling. So he had ignored it. By the time he sought medical help, his right testicle was "almost the size of an orange" and the cancer had spread to his lungs and brain. He had the testicle removed, followed by brain surgery, and then heavy bouts of chemotherapy to mop up the multiple cancer sites in his lungs.

His was not any old cancer, it was advanced cancer with secondaries, from which the chances of survival were 40 per cent. But Armstrong did not just survive, he excelled. Three years after his diagnosis he won his first Tour - more than 2,000 miles of endurance cycling against the fittest men on the planet.

His example has been an inspiration to cancer sufferers, not because it showed them how to fight cancer, but because it showed them it was possible to beat the odds. Much is written about a "fighting spirit" in beating cancer, most of it nonsense. There is very little evidence that the attitude people adopt to a cancer diagnosis makes any difference to survival. We talk of people battling cancer but people who resign themselves to it do just as well - or badly. A review of 26 studies of different psychological coping styles on cancer published last year in the British Medical Journal showed that none affected survival or the chance of recurrence. But although attitude may make little difference to survival, it can make a big difference to the quality of life. When Sir Peter Medawar, Nobel prizewinner in immunology, was asked what the best prescription against cancer might be, he replied, "A sanguine personality".

Armstrong had anything but a sanguine personality. He became obsessed with the Tour, the world's greatest bike race, describing his annual pilgrimage to compete in it as an "obligation of the cured".

So how did Armstrong do it? Allegations of drug-taking have dogged him and most other riders in the Tour for years but, in his case, have never been proved, despite repeated tests. Oncologists who know about the damage chemotherapy can do, regard his recovery as phenomenal. Mike Leahy, of St James Hospital Leeds, says: "It is a bit like being carpet-bombed. If anyone goes into competitive cycling after that, they are doing so at an enormous disadvantage. You wouldn't expect an athlete to come back to 100 per cent after that. Ever, probably."

For Armstrong the bike was both a challenge and a release. He had learnt how to use it as a release as a child, pedalling away from an abusive stepfather, flying along the road, dreaming of escape.

Then when cancer struck he turned to the bike again. Amid the challenges of surgery, chemotherapy, being dropped by his sponsors, comeback attempts and trying to conceive a child - at the centre of it all was his strangely moving relationship with the bike.

"Why did I ride when I had cancer? Cycling is so hard, the suffering is so intense, that it's absolutely cleansing. You can go out there with the weight of the world on your shoulders and after a six-hour ride at a high pain threshold you feel at peace. I didn't love the bike before I got sick. It was simple for me: it was my job and I was successful at it... But now I loved the bike, I needed it."

When talking about recovery from cancer, doctors quote averages. But individuals are hugely variable and survival may range from weeks to years. A fighting spirit may not help you live long, but as Armstrong has proved, it can help you live astonishingly well.