Steve McQueen was at his absolute height as a movie star when he began work on his passion project Le Mans (1971). Thanks to a string of successes like Bullitt and The Thomas Crown Affair, he was one of the most powerful figures in Hollywood, able to choose his own projects and set his own terms. Fans revered him as the coolest, most charismatic actor of his generation.

In theory, Le Mans had all the ingredients to be a huge hit. McQueen himself starred in a role tailor-made for him as Michael Delaney, the driver in the Porsche in the 24-hour race in Le Mans. However, as a new feature documentary, Steve McQueen: The Man and Le Mans reveals, the project very nearly destroyed him.

The film itself wasn't a success. Its original director, John Sturges (who had also worked with McQueen on The Great Escape), abandoned the project. His marriage came under severe strain – and so did the finances of his production company. His paranoia was mounting. The Sharon Tate murders had happened in LA a few months before filming began. During the course of shooting, McQueen, who had discovered he was on Charles Manson's death list, requested that a gun be sent over for his protection.

"I've always wanted to shoot a motor-racing picture because it has always been something close to my heart. I sometimes thought maybe I shouldn't do it," McQueen is heard saying in the trailer for the documentary, which receives its world premiere in Cannes this weekend. "When something is close to you, you have a tendency to become too much of a perfectionist with it."

Best films to watch in 2015 Show all 10 1 /10 Best films to watch in 2015 Best films to watch in 2015 Suffragette - 11 September Meryl Streep is bound to make a formidable Emmeline Pankhurst in Sarah Gavron's new film about the British women's suffragette movement of the early 20th century. Streep is again working from a screenplay by Abi Morgan who also wrote The Iron Lady. Getty Images Best films to watch in 2015 Far From The Madding Crowd - 1 May Thomas Vinterberg turns his hand to Thomas Hardy and British costume drama. Memories of the John Schlesinger version with Alan Bates and Julie Christie will be hard to exorcise. Carey Mulligan and the mercurial Flemish actor Matthias Schoenaerts star as Bathsheba Everdene and Gabriel Oak. Best films to watch in 2015 Jurassic World - 12 June The third Jurassic Park sequel is finally here starring Chris Pratt. The storyline goes something like this - theme park gets dinosaur to attrack visitors and it all goes horribly wrong. Should prove a fun one among cinema-goers. Colin Trevorrow Best films to watch in 2015 Terminator: Genisys - 3 July Arnold Schwarzenegger kept his promise - he's back and he's trying to stop Judgement Day. Best films to watch in 2015 Spectre - 6 November Bond is back for the 24th time. So is arch-villain Blofeld. Director Sam Mendes did a sterling job with Skyfall but the last movie ended on a very downbeat note with poor old Judi Dench signing out of the series. The challenge now is to reinvigorate a franchise that is already well into its 50s. Rex Features Best films to watch in 2015 Star Wars: The Force Awakens - 18 December Given the fuss over the first teaser trailer for the new Star Wars (already watched by 70 million people and rising) the film itself will surely break the franchise's own box-office records. It may turn out to be the most enormous anti-climax but there are so many die-hard Star Wars fans that any dissent is bound to be suppressed. Star Wars Best films to watch in 2015 Cake - 20 February It's Rachel from Friends as you've never seen her before as Jennifer Aniston plays Claire Bennett - a woman who initiates a relationship with a widower while battling hallucinations of his dead wife. Best films to watch in 2015 Suite Francaise - 13 March It will be intriguing to see how Saul Dibb’s long-awaited adaptation of Irène Némirovsky’s novel deals with a problem that has often confounded British film-makers: how to portray French characters played by English-speaking actors in Nazi-occupied, wartime Paris without slipping into ’Allo ’Allo!-style caricature. Michelle Williams and Kristin Scott Thomas lead Dibb’s promising cast. Best films to watch in 2015 In The Heart Of The Sea - 13 March Chris Hemsworth plays tough seafarer Owen Chase in this dramatic Moby Dick movie. Warner Bros Best films to watch in 2015 Cinderella - 27 March Kenneth Branagh's live action remake of Disney's classic tale stars Downton Abbey's Lily James. Helena Bonham-Carter and Cate Blanchett also star as the Fairy Godmother and evil stepmother. Disney

That perfectionism was going to cost McQueen dear. The new documentary is directed by Gabriel Clarke and John McKenna. What has been causing huge excitement among motor racing and film fans alike is the wealth of unseen footage that the film-makers have turned up of McQueen's folie de grandeur.

Film-maker and journalist Clarke, well-known to British viewers for his football reporting on ITV, has revealed the extraordinary efforts he and McKenna made to track down the missing footage. It had been claimed that well over a million feet of film were shot by McQueen and his team during the making of Le Mans. There were issues with the storyline and script during production, and as they waited for these to be resolved, the film-makers kept shooting and shooting. They were filming during the actual Le Mans race with multiple cameras – and seemingly with little thought as to how their hours and hours of footage were actually going to be incorporated into the movie.

The out-takes had long since gone missing, presumed lost. Some had speculated that the film-makers themselves may have destroyed the material when the project went sour on them. Even McQueen's own son, Chad McQueen, feared that the footage was lost.

"Some of our footage came from private family collections," Clarke says, talking about the various sources they drew from for the film. "Other footage had been recorded at the time. There was an on-set 'making of' documentary made by one of our contributors, John Klawitter..." They also unearthed a Swiss documentary, The Song of Le Mans, made during the shooting of Le Mans but never released. (This turned up in a Paris film vault.) They also came across several hours of super 8mm home-movie footage shot by one of the drivers, Paul Blancpain, during the race.

Klawitter himself discovered film reels stored away in his own garage. "They had been there for more than 40 years – and thanks to the kindness of California's climate, they had survived the ravages of time."

The real "holy grail", though, was the discovery of out-takes footage. "We spoke to family, to people who had worked on this project. As far as they were concerned, this film didn't exist," Clarke recalls. There was "a vague lead" to a disused warehouse in New Jersey. Some contacts suggested that the rushes might be in private collections in South America. (McQueen memorabilia remains highly sought after there.)

Clarke and McKenna just happened to make a late night call to an editor in Los Angeles. An email came back saying that "hidden beneath a sound stage and covered in dust, we found between 400 and 600 boxes of film." Miraculously, the rushes had survived intact. The first box the film-makers looked at contained material from the camera car. "It was just inspiring to look at," Clarke says. "McQueen wanted a camera car – a car that was racing in Le Mans and from which they could use the footage to put across the authenticity of the driver during the race."

Exhausted: McQueen with his wife, Neile, on the set of 'Le Mans' (Rex)

Le Mans was intended by McQueen to be the ultimate racing movie. He wanted viewers to feel they were behind the wheel, experiencing the event at first hand. "Once we knew the rushes existed, we could really put this across."

Some of the Hollywood star's relentless perfectionism was clearly shared by Clarke and McKenna. The rushes came without sound, but the film-makers made sure during post-production that every last growl of an engine was authentic. Whether it was McQueen in a Porsche 917 or another driver in a Ferrari 512, the sound the car makes is exactly as it should be.

The motor-racing community appreciated Le Mans, and the film has been called "essential viewing for anyone with gasoline in their veins." However, box-office returns were disappointing and McQueen himself never quite recaptured the lustre he had once held.

The metaphor that many use to describe McQueen's involvement in such an epic and ill-fated project is of Icarus flying too close to the sun.

"The story itself is so much more than just Steve McQueen, the motor-racing fanatic. The story is this obsession that McQueen had to make the ultimate racing film," says Clarke. "Everyone around him was convinced that he was untouchable and that this was going to be the ultimate film, not just a racing film… with Steve McQueen in a racing car, what could possibly go wrong? Of course, things did go wrong."

"Part of the reason we feel that this is an inspirational story is that you do go into dark places with Steve – and you do realise that his was a flawed character. He was a genius of a man. One of the things we hope to put across is that he was a visionary."