Alberto Contador returns to Pinto on a beautiful November afternoon. He has just been to the dentist, on a very ordinary day at home for the celebrated champion, and he offers an unexpected smile. The story goes that Pinto, where Contador grew up 20 minutes south of Madrid, is at the exact geographical centre of Spain. The town even has its own monument, proclaiming this apparent fact, but the tangled past of its most famous son is far more interesting.

Two hours later, as we step outside again, the night sky is inky black and the cyclist has laid bare the riveting details of a life that skirts death and glory, brilliance and infamy. Contador, who has won seven Grand Tours, and seen two more stripped from him after failed drug tests, cuts a thrilling and graceful sight on his bike. But here, in Pinto, he is unusually relaxed.

“It’s been a very tough season physically and psychologically,” Contador says, “and the toughest year of my career because my objective was to win the Giro d’Italia and the Tour de France. I won the Giro, but not the Tour. Sport is now much more scientific but you still don’t know how tough each Giro or Tour will be until you race them. But now I can recover and be a normal person again – not eating only salad and vegetables.”

Contador turns 33 next month and he has just one year left, two at most, to drive his body to the extremes needed to win a last Tour de France. The end is hurtling towards him and so Contador lingers over some memories. “I came late to cycling,” he says in Spanish. “I was 14 when I got my first bike. I remember it perfectly – a very old Orbea, black and heavy, and it belonged to Francisco [my eldest brother]. Franc got a new bike from my parents. We didn’t have much money, because my dad worked in the factory, so I got the old Orbea and Franc’s [cycling] trousers. They were too big but it’s all I had. Same with the shoes.

Alberto Contador rides during stage 12 of the 2015 Tour de France. Photograph: Bryn Lennon/Getty Images

“As soon as I got home from school I’d eat a little and pull on my cycling trousers, eat a bit more and pull on my top, eat a little more and put on my shoes. I went on my Orbea, pedalling around Pinto. I remember my mate shouting: ‘Hey, Indurain. Go, go.’”

Contador loved Marco Pantani, the doomed Italian cyclist, more than Miguel Indurain, the formidable Spaniard who won the Tour de France five times. Indurain and Pantani are the last two cyclists to complete the Giro-Tour double in the same year but Contador felt more affinity with the Italian climber. “In the beginning I was very bad technically. But when the road went up [Contador indicates a steep climb] I always won the mountain prizes. But it was very difficult to win the whole race. So there was doubt but I liked people calling me Pantani because of my climbing. I could stand on the pedals and ride hard for 10 minutes on a climb. It felt natural.”

Contador’s family life was much more difficult. Raul, the youngest of four children, was born with cerebral palsy and even now, at 26, needs constant care from their parents. “In some ways,” Contador says, “these problems built my character.”

They put a tube in to help me breathe. I was lucky it happened in a race because if I’d been training I would be dead.

The cyclist was only 21 when his family thought he was about to die after he collapsed during the Vuelta a Asturias in 2004. It was discovered eventually that he had suffered a cerebral cavernoma. “Everything began three weeks before a two-day race in Madrid. I was preparing for my Tour de France debut but I was suffering from terrible headaches. I was obsessive about the Tour and thought I must do this race to help my preparation. On the second day I felt so bad I had to abandon the race.

“That night I travelled to the Tour of Asturias and for two days I couldn’t train. The pain was so bad. I still tried to do the first stage and at the start I felt very cold. I remember only the first 40 kilometres and then slipping down the peloton and crashing. The convulsions started then. Fortunately an ambulance was there and they put a tube in to help me breathe. I was lucky it happened in a race because if I’d been training I would be dead.”

Contador was taken to hospital in Asturias and doctors initially believed that a slight swelling of his brain had been caused by the accident. After he was transferred to a bigger hospital in Madrid, where he was stabilised, Contador was allowed to return home. “After five days I suffered another crisis at five in the morning. My parents heard some blows in my room and they saw me convulsing. It took a long time for the ambulance to come and I was having convulsions all the time. In hospital I was unconscious for three hours. The doctors told my family I might be brain damaged but I was lucky. I was OK and they found the cavernoma. They had suspected a tumour but the doctor said I still needed a very risky operation. They gave me lots of documents but I didn’t read them. I just signed the agreement.”

Was he frightened? “No. As soon as I felt fear I made myself think of something else. When I woke up my mother said ‘querer es poder’. In English it means ‘where there is a will there is a way’. It became my motto from that moment.”

Six months later Contador rode his bike again for the first time. “I always remember the day – 27 November 2004. It was very cold but I felt full of life. I had to go training with Franc and a friend because the doctor would not allow me to go alone. No one knew what would happen but I was very happy. It’s even more incredible that six weeks later I won a stage in the Tour Down Under. That’s why I believe my greatest victory was in Australia.”

Alberto Contador: ‘where there is a will, there is a way’ became my motto Photograph: Maria Arranz/The Guardian

His most recent victory was in this year’s Giro when, despite dislocating a shoulder on the sixth stage, Contador was dominant. “The Giro was special but very difficult. I dislocated my shoulder 200 metres before the finish and after that I went to the podium. I was the leader and when I tried to take off the jersey the shoulder dislocated again. In that moment I was really worried. I thought maybe I cannot continue as the next stage was the longest in the race, 270km. It was very tough and the headwind was very strong.

“I knew I’d be on the bike for seven and a half hours and after three and a half hours I felt very bad. The pain reached a level and stayed there. It was so bad it couldn’t get any worse. The problem was knowing I faced four more hours on the bike. Then on stage 13 I crashed with Richie [Porte] and lost the yellow jersey to Fabio [Aru]. But the next day I put a lot of time into the others in the time-trial. It was a crucial stage.”

Contador was so drained by the Giro that he faded in the Tour – and finished fifth behind Chris Froome who was questioned and doubted throughout the race. Froome was also spat at and had urine thrown at him. “Of course I feel some sympathy for Froome,” Contador says. “During the Tour you put in an incredible effort. And to lead the race takes even more. I still think cycling is a beautiful sport but some people just want to disturb the race. It’s sad.”

Why is such vitriol directed at Froome in the face of his denials when Contador and Astana’s Vincenzo Nibali are not hounded as fiercely? “Some people like Team Sky and Froome. Others dislike him. Maybe his system of work is hermetic.”

What does Contador mean? “It’s not open,” he says. “Maybe [Team Sky] work in different ways to other teams and maybe people dislike this way of working. But we all have that. Every rider and every team has critics and fans.”

Will Froome’s decision to soon release all independent analysis of his test results help blunt the campaign against him? “I don’t think so. It won’t give too much to resolve this problem. Maybe it’s more important that people can see you being more open in the way you work. I think that’s more useful than just giving out lots of data.”

What did Contador think when, in September 2010, he heard he had tested positive for clenbuterol during a rest day of that year’s Tour? “For me in that moment I cannot believe it. I never thought this could happen to me. My parents taught me to do things in a clean and honest way. I was so frustrated [but] I don’t want to speak more about that now – it’s in the past.”

Contador claims that the clenbuterol was a consequence of him eating contaminated meat. His supporters argue that the UCI found that the concentration was significantly below the amount needed to be performance-enhancing. But his critics point to a report that there had been no evidence of clenbuterol in 19,431 animal tests undertaken in Spain the previous two years.

In February 2012 Contador was found guilty of “accidental ingestion” of clenbuterol and suspended until August that year. His wins in the 2010 Tour and 2011 Giro were removed from the record books. It’s striking how emphatically he responds when asked if he still believes he has won nine Grand Tours rather than the adjusted figure of seven.

Alberto Contador poses in front of his Vuelta, Tour de France, and Giro winning jerseys while holding the UCI winner trophy. Photograph: Maria Arranz/The Guardian

“Si, si,” he exclaims. “Without doubt I’ve won nine. Look at the jersey of the Tour 2010 and the Giro 2011,” Contador says, pointing to the framed mementoes on the wall in his Foundation office. “I won both those races in a clean and honest way. Only with work and sacrifice. I put those up as an example.”

Does Contador accept he made some bad choices earlier in his career when joining teams like ONCE and Astana – besmirched by association with doping? “You can write many books about each season because so many things happened – stuff you did not expect. You need to have your own strategy and go on always and look to the future. It’s the best way to fight these problems.”

Contador is selective in choosing which memories to re-examine but he insists this is rooted in his belief that cycling is much cleaner now than when he began to ride professionally 12 years ago. “With the system of anti-doping control we now have and the quantity of those tests for the top riders it is impossible to cheat. If you do it’s like a suicide. I’ve no doubt this is why it’s clean at the very highest level.”

Did he follow last week’s shocking revelations of doping in Russian athletics? “Yes, but maybe I’m selfish. I only think of cycling. It’s my passion. The IAAF news is of secondary importance.”

As darkness spreads outside, Contador’s thoughts turn to the end. “I want to finish my career at the top level – if possible winning the Tour. I think 2016 will be my last year – but if I have an accident or something stops me being at my best level at the Tour then maybe I’ll continue another year. It would be perfect to win the Tour, do the Olympics and end happily.

“If you look at the 2016 Tour route the flat time-trial will be better for Froome. But the other time-trial will be a climbing one and that’s better for me. This year Froome was at a higher level than anyone – but maybe [Nairo] Quintana will come to this level. His evolution is good and so, as my main rivals, I’d put Quintana and Froome at the same level for next year.”

Contador relaxes again. He will fly to London this week and attend the Rouleur exhibition but there is still time to return to the heart of his story in Pinto. “I am not sad about ending,” he says, “because I’m already proud. I’m proudest of how I overcame my illness in 2004. I gave lots of encouragement to people who have had a stroke or a cavernoma. That matters more than anything in the end.”

Alberto Contador will speak at the Rouleur Classic on 19 November to raise the profile of his Foundation supported by Saxo Bank. Tickets at www.rouleurclassic.cc