Sir Stirling revealed that he had taken the pills - most probably Benzedrine or Dexedrine - before setting out on the famous Mille Miglia (thousand miles) rally from Brescia in Italy to Cologne in Germany in 1955.
He went on to win the endurance race, covering the course in his Mercedes 300SLR in record time. Arriving in the German city with his navigator, Denis Jenkinson, he went straight to his hotel room with his girlfriend, Katie Molson.
But now, in a magazine interview, Sir Stirling has lifted the lid on the secrets of his success, admitting that he used the pills to keep himself awake during the drive. The confession may surprise some fans of the great British driver, who has built a career on his squeaky clean image. The use of such drugs is now banned by the sport and would lead to instant disqualification if a driver was caught using them.
But at the time, there was nothing in the rules to outlaw such behaviour and the use of pep pills was commonplace. Amphetamines were still available over the counter and it was not until the year after Sir Stirling's triumph that they were made prescription-only. They remained popular, and ten years later, doctors were prescribing 5.5 million a year.
Sir Stirling, now 76, made the admission in an interview with the Italian Quattroruote (Four Wheels) magazine, revealing he had been given the tablets by his Argentinian rival and Formula One team-mate just before the start of the Mille Miglia race in May 1955.
He said: "Just ahead of the start Fangio gave me some pills to help keep me awake. I have no idea what was in them but they certainly worked. At the time all the other drivers were taking them. To keep awake they used Benzedrine and Dexedrine, especially in rallies.
"I'm not sure what was in the ones Fangio gave me but certainly today they would have been a banned substance."
But it should come as no surprise to motor racing aficionados to discover that Fangio would try to help the British driver. The battle between the pair on the track was one of the highlights of Formula One in the 1950s, but the rivals - and Mercedes teammates - were also good friends.
Fangio had the better of the duel, winning a record five titles in a career that encompassed 51 Grand Prix between 1950 and 1958, of which he won 24. Moss, however, never secured the title. The British driver, who rated the Argentinian as the greatest racing driver of all time, managed to pick up 16 wins but had to settle for the runner-up slot four years in succession, from 1955 to 1958.
But Fangio did not always have it all his own way. In 1955 Moss beat Fangio at the Aintree circuit to become the first British driver to win his home Grand Prix.
Fangio conceded that Moss was the quicker man on the day, but Moss harboured a suspicion that his friend was trying to help him out on that occasion too, later admitting that he was not sure whether his rival had simply let him through.