Hero. Villain. Prodigy. Pariah. Over the past decade, Scottish cyclist David Millar has heard them all. Now a sole word occupies his thoughts: redemption.

Millar’s story is one which has polarised the cycling world. Seven years ago he was arrested in Biarritz on suspicion of using illegal performance enhancing drugs.

In less than 24 hours, Millar -- crowned world time trial champion in 2003 -- went from golden boy to liar and drugs cheat, caught red-handed by French police who discovered two syringes hidden at his home.

Afterwards Millar, who served a two-year ban from competition, was seen to symbolise all that is wrong with the sport. Yet paradoxically, he has now become a crucial catalyst for change, re-inventing himself as an outspoken anti-doping campaigner and fervent advocate for cleaning up cycling.

His recently published autobiography, Racing Through The Dark, is an unflinchingly honest account of the spiralling pressure which saw him drawn into a murky world of doping where "cycling’s drug culture was like white noise".

In writing it, Millar, 34, tells me he wanted it to be an account which not only defined his generation of cyclists but flew in the face of the sport’s ingrained code of silence -- however uncomfortable that may be.

We meet at the Edinburgh International Book Festival, finding a quiet spot in a tucked-away gazebo. His publicist bustles around with refreshments. "Is there any beer?" Millar asks hopefully. There is only whisky and wine. He settles for the latter.

While Millar spends most days in skin-tight Lycra, off-duty he is dressed down in jeans and a checked shirt, the buttons on one sleeve done up slightly wrong. A whippet thin 6ft 4in, he folds his limbs awkwardly as he sits, nervously running his fingers through his hair, brown eyes wary, as if bracing himself for the inevitable character assassination to follow.

His cycling career started with textbook promise. Having packed himself off to France, he turned pro at 20 and steadily worked his way through the ranks. In 2000, on his Tour de France debut, he won the prologue stage, holding on to the yellow jersey for three days.

As a young cyclist Millar took pride in railing against a mindset which saw many of his teammates take performance-enhancing drugs without blinking an eyelid. Yet, as the pressure for results intensified, his once steely will slowly began to erode. Millar was seen as an anomaly amongst his peers. Eventually, he concedes, he was simply too weary to continue fighting.

"It got to a point where it was almost easier for me to dope than not to," he says, pain clouding his face. "Psychologically I just gave in, I couldn’t fight it any more, it seemed like such a lost cause. No-one seemed to care: not the team bosses or heads of the sport. Even the media seemed naive and blind to it all. So many things built to that point. It was an accumulation of little things, a deterioration of character and my ethical standards."

Taken under the wing of an unnamed Cofidis teammate -- whom he refers to only as "L’Equipier" ("the teammate") -- at a farmhouse in Tuscany in 2001, Millar injected the blood-boosting hormone Erythropoietin, or EPO, for the first time.

From that moment the die was cast. Something shifted in him. In his mind there was no turning back. When he won races while doping Millar felt not jubilation, only relief. On the days he lost, he says, it felt as if it had all been for nothing.

"I had to take more and more pills to sleep," he says. "The biggest effect for me, though, was psychologically. The moment I started injecting myself with drugs I started living a permanent lie. I had become something I never thought I would."

Continuing to dope, Millar became world time trial champion in 2003 and was seen as a British gold medal contender at the 2004 Athens Olympics. Then, unexpectedly, the walls came tumbling down.

While dining in a Biarritz restaurant in 2004, Millar was approached by police officers investigating a rash of doping allegations across the sport. They searched his house and found the empty phials and syringes he used to inject at the World Championships hidden away in a bookcase as "a poignant souvenir". After 47 hours in custody Millar confessed everything. Game over.

Did Millar want to be caught -- or is that merely twee amateur psychology? He takes a sip of wine, nodding. "Ultimately I was a very underdeveloped human being," he admits.

"I did want to get caught, without a doubt. There was a subconscious element to me putting them there -- and it did save me. If the syringes hadn’t been there, I would probably have fought and denied [the doping allegations]. I would likely have been released from the police investigation, but then have to live the lie forever. It would have been a downward spiral to destruction."

Despite his perceived inherent flaws there is something hugely likeable about Millar. He doesn’t mince his words or tiptoe around the tricky issues.

The eldest child of Avril and Gordon Millar, he was born in Malta and spent his early childhood in Forres, Moray. His father was a pilot and Millar has vivid memories of playing in the aircraft hangars at RAF Lossiemouth. "I have realised what I long considered to be many of my quirky personality traits are just, in fact, well, me being Scottish," he says.

The family moved to Aylesbury, Buckinghamshire, when he was seven. Four years later his parents split and Millar moved to Hong Kong with his father, shuttling back to his mother’s home in Maidenhead, Berkshire, during school holidays.

It was a nomadic lifestyle, he admits, that stood him in good stead for his future cycling career. "I’m quite adaptive," he says. "I’ve learned that from being an expat -- I’ve been an expat my whole life."

Now based in Girona, Millar lives in a rambling farmhouse with his wife Nicole and their two dogs. The couple married in 2009, Millar describing it as love at first sight. "I love my wife dearly and consider myself to be lucky, perhaps because I never envisaged what I would call a normal family life.

"It was simply not within the reaches of my furthest, maddest dreams. I’m always shocked at the person I am now, living in a farmhouse, married with a pregnant wife. It wasn’t meant to happen for me."

When I meet Millar, there’s only three weeks until the due date. "It’s very exciting," he says, with a goofy grin. "I can’t wait. Nicole is absolutely convinced it’s a boy, so I’m pretty sure it’s going to be a girl." As it turns out, Nicole was spot-on: Archibald Millar arrived into the world on Friday lunchtime last week.

After serving a two-year ban from cycling, Millar returned to the sport in 2006 and is now on the athletes’ commission of the World Anti-Doping Agency. In 2007 he helped set up Team Slipstream, which Millar co-owns, with American former cyclist Jonathan Vaughters who has also admitted to doping.

The team, now known as Garmin-Cervelo, has taken a proactive role in trying to clean up cycling. "We are the vanguard of anti-doping," says Millar. "We assume a certain duty in that, Jonathan and I. We see it as our penance towards the sport."

Cycling, though, isn’t for the faint-hearted. A network of scars criss-cross Millar’s body, the remnants of years of "road rash". A thin layer of Lycra, he says, offers no protection in a crash. He describes falling at high speed in a competitive bike race as the equivalent of throwing yourself out of a moving car naked.

"I’m pretty bashed up," he says. "I have almost no nerves left in my elbow. The worst was when I was hospitalised for a week after falling off and smashing up my leg. I think I’m quite good at crashing, I have the knack of it now. I have very dense bones. Because I don’t stretch, I’m the most unsupple person in the world so if I hit the deck nothing moves."

While banned for life from the Olympics, Millar had his Commonwealth Games ban overturned in 2009 and took gold for Scotland in Delhi last October. Having pulled out of this week’s Tour of Britain for paternity leave, Millar will compete in the UCI Road Race World Championships in Copenhagen this month with the goal of helping fellow Brit Mark Cavendish claim the hallowed rainbow jersey.

He recently re-signed to Garmin-Cervelo for three years, taking him to his 37th birthday. "I have a romantic idea that I will retire at the Commonwealth Games in Glasgow in 2014," he says. "If I’m going to do it, I would like to do it properly. Have a block party. Go out in style."

Until then, Millar plans to savour every moment of his second chance. "One thing I learned during my ban is how quickly it can all disappear. I don’t want to take it for granted."

 LIFE AND LOVES

Career high?

Most recently, being on the podium with my team at the 2011 Tour de France.

Career low?

2004.

Favourite holiday location?

At home in Girona.

Favourite meal?

Pasta.

Favourite film?

American Psycho, starring Christian Bale. The satire and humour is so dark.

Favourite music?

I don’t listen to music that much. It has a strong effect on me, so I try to avoid it.

Best personality trait?

Fun, gregarious and friendly.

Worst personality trait?

I can be dark and lazy.

Best advice received?

Work hard, be patient.

Perfect dinner guests?

The photographer Nadav Kander, fashion designers Tom Ford and Paul Smith, and someone from the military.

Racing Through the Dark by David Millar is published by Orion, priced £18.99