It was a balmy spring evening in Cannes. Arriving for the premiere of his latest film, The Beaver, Mel Gibson seemed anxious as he walked the red carpet last month, a little uncomfortable posing for the massed ranks of photographers who were shouting his name. When the movie's director, Jodie Foster, leaned across to adjust his bow-tie, Gibson smiled, right on cue. But while the two of them chatted and laughed for the cameras, the actor's brow remained furrowed. The next day's photographs would all show the three deep wrinkles cut horizontally across his tanned forehead, giving him the air of someone who expects disappointment and – more often than not – is rewarded with it.

He was understandably worried, perhaps, about how the film would be received. The Beaver, in which the 55-year-old Gibson plays a depressed chief executive who communicates with his family through a glove puppet, is the first movie he has made since his inglorious public meltdown. Last July, Gibson became involved in a toxic public battle with his ex-girlfriend and the mother of his youngest child, the Russian musician Oksana Grigorieva. Audiotapes leaked to an American gossip website purportedly recorded Gibson directing a series of aggressively foul-mouthed rants at Grigorieva, slinging racist and misogynist abuse at her. "You look like a fucking bitch in heat," he shouted, his words slurred and imprecise. "And if you get raped by a pack of niggers, it will be your fault."

It was not the first time that Gibson's temper and unreconstructed world view had been unpleasantly aired in public. In 2006, he was stopped for speeding by a police officer in Malibu. Gibson, who has a history of alcoholism, was driving with an open bottle of tequila in his car. His blood-alcohol level exceeded the legal limit. As Gibson was handcuffed and put in the back of the police car, he launched into an unprovoked, antisemitic tirade in which he claimed that "the Jews are responsible for all the wars in the world". A subsequent mugshot, released to the media, showed Gibson peering up at the camera with untidily gelled hair, unfocused eyes and an inane smile on his face, as though, even in police custody, the only role he knew how to play was that of the famous heart-throb who could get away with it.

As it turned out, he couldn't. Hollywood retribution to these two incidents was swift. After the first outburst, one studio boss suggested an industry boycott, the comedian Rob Schneider took out a full-page advertisement in Variety stating that he would "never work with Mel Gibson-actor-director-producer and antisemite", while a mini-series on the Holocaust that Gibson had been developing with the ABC network was dropped.

After the second outburst, a cameo part that Gibson had been slated to play in The Hangover II was withdrawn when cast members complained. It was an embarrassing fall from grace for the man who, at the pinnacle of his fame, produced, directed and starred in Braveheart, winning two Oscars for his efforts. There was a tangible sense that, even if no one said it out loud, the once bankable Mel Gibson was now box-office poison.

"Apparently, very few people saw this side to Mel all these years," says Paul Sylbert, a renowned art director who worked with Gibson on the 1997 film Conspiracy Theory. "There have always been antisemites in Hollywood but they keep it more or less to themselves. They don't get drunk and start shouting at a cop."

Sylbert, who is Jewish, nevertheless says he thought Gibson was "terrific" to work with: "I liked him immediately. He was funny, pleasant, always on time, serious as a worker and as much a part of the crew as it was possible to be. He was playful, funny, like a little child with lots of energy. You couldn't not like him. At the wrap party, I remember him coming round with a box of cigars, a whole assortment, and he was saying to everybody, 'Smoke one!' He couldn't have been nicer.

"He fooled me completely. I don't think he looked at me as a Jew. I don't think it entered his head. I think a lot of people like me were baffled by what happened."

Back in Cannes, Gibson was right to be worried about how his new film would be received by the audience. In the event, any fears were to prove groundless. As the credits rolled, the crowd gave The Beaver a 10-minute standing ovation. "The applause went on for so long, I actually began to feel uncomfortable," says one of Gibson's entourage. "It just wasn't ending."

The day after the screening, any lingering interest over Gibson's past misdemeanours was overshadowed by the Danish director Lars Von Trier claiming to be a Nazi at a press conference. The ensuing scandal conveniently shifted the limelight away from Gibson's personal life.

The Beaver has so far had a muted reception in the States. The reviews, too, have been distinctly mixed. Peter Bradshaw, the Guardian film critic, called it "laborious" and noted that Gibson failed to "project an underlying sympathy or charm in his character". But Roger Ebert of the Chicago Sun-Times hailed it as "a reminder that [Gibson] is, after all, a superb actor".

Can Gibson make a comeback from the depths of public ignominy? "Yes," says the film historian Peter Biskind. "Practically anybody in America can make a comeback [but] I don't think The Beaver is going to be the film that does it." For Biskind, Gibson's volatility is what makes him "a great actor". "There's nothing new about that – most movie stars write their own rules and get away with it."

Gibson has been writing his own rules for longer than most. This is the man who, after becoming one of the highest-grossing actors in Hollywood (his movies, including the hugely popular Mad Max and Lethal Weapon series, have earned more than £1.2bn worldwide), decided to pour several million dollars of his own money into directing a 125-minute film of the last 12 hours of the life of Jesus Christ. The Passion of the Christ, released in 2004, was told exclusively in Aramaic, Latin and Hebrew and contained graphic violence. A 56-year-old woman had a fatal heart attack while watching the crucifixion scene in a cinema in Wichita.

In spite of the gory subject matter and allegations of antisemitism in Gibson's handling of the part played by the Jews in Christ's death, the film was an unexpected hit and was nominated for three Academy Awards. It made £300m at the box office and catapulted Gibson into the ranks of the movie industry super-rich (because he had his own production company, Icon, he kept control of the profits).

His private life, too, seemed atypically stable by Hollywood standards. Gibson, a lifelong Catholic, had been married to Robyn Moore, a former dental nurse, since 1980. The couple had seven children and split their time between two houses in Malibu, an Australian ranch and a Connecticut mansion. For a while, he seemed untouchable. But, six years after The Passion of the Christ, his wife had left him, his former girlfriend had accused him of punching her in the face and he was being publicly reviled as a racist, drunken bigot.

What makes a man, seemingly at the height of his creative powers and popular success, risk everything in such spectacular style? And which Mel Gibson are we to believe in – the fresh-faced movie idol who once commanded £10m a movie or the angry drunkard spewing out his spittle-fuelled invective?

The answer, according to those who know him, is both. "It's Jekyll and Hyde," explains a friend and colleague. "He can be the nicest guy one day: funny, supportive, kind. The next he can be dark and difficult. It's not a mood swing exactly; it's more that he has these two distinct personalities and you're never sure what you're going to get. On a bad day, he can be depressed, almost bipolar, and he can lose his temper. But on a good day, I'm telling you, there's no greater guy."

According to Benoît Debie, cinematographer on How I Spent My Summer Vacation which stars Gibson and will be released later this year: "Mel is very intense. He can be both ways. Sometimes, he'll be very strong and difficult with the crew; sometimes, he can be very nice and kind as well. It's like there are two polarities."

As an example, Debie points to the fact that the film's director, Adrian Grunberg, was hand-picked for the project after the pair worked together on Apocalypto, a Mayan action-adventure set in the Mexican jungle which Gibson had directed, with Grunberg acting as his first assistant. "Mel told him, 'Write a script, I can produce and will act in it and you can direct it,'" recalls Debie. "It was very generous of Mel Gibson to help this young director like that. But at the same time he was quite hard with Adrian on set. Mel could be quite intense with him and sometimes very difficult, a bit overbearing. When Mel was in shot, he liked the camera to see his face. He didn't want to be in the dark because he's a legend, a movie star. He's a good guy but he's troubled."

Almost everyone I speak to seems to have a similar take: his friends and associates see him as a complex man, riven by contradiction, with a dark edge. And yet, on set, he is also the person who likes to play practical jokes and to defuse tension by simulating farting noises.

When Ivana Chubbuck, a Los Angeles-based acting coach, first met Gibson at an Oscars party 10 years ago the two of them "spent hours talking about no matter how dark or dramatic a role is, it also has to have a sense of humour".

Chubbuck, who now counts Gibson as a friend, adds: "The real point about Mel is that he's got edge, but he's got it with humour. He's not afraid to be self-deprecating, but he's a risk-taker too and that underlying danger makes him interesting."

Perhaps the most surprising admission among those who have worked closely with him through the years is that no one can remember a single incident where Gibson was racist, antisemitic or sexist. It is genuinely hard to find anyone with a bad word to say about him. The majority of people I speak to are utterly mystified by what happened and remain staunchly loyal.

Danny Glover, his co-star in Lethal Weapon, has spoken out publicly in support of his friend – "I love Mel… [he's] a very generous man" – and has stated that Gibson made substantial financial donations to anti-apartheid charities in South Africa. Alan Nierob, Gibson's publicist of 25 years, is Jewish, as is Richard Donner, the director of the Lethal Weapon films and one of Gibson's closest allies. Jodie Foster, an atheist, recently defended him in Cannes, calling him "the most loved actor in Hollywood", and Gibson's ex-wife, Robyn, issued a sworn declaration insisting that he had never hit her during their 28 years together and was "a wonderful and loving father".

He is capable of grandiose gestures of kindness. While filming How I Spent My Summer Vacation on location in a prison in Veracruz, Mexico, Gibson learned that an elderly Mexican extra was suffering from cancer. "Gibson found him an alternative cancer therapist in Arizona," says Biskind, who was told the story by a crew member. "He got him a visa by writing to the American ambassador and then flew him there. And this guy was Jewish! The director, Adrian Grunberg, is also Jewish. It just doesn't compute."

"I've never seen him be antisemitic or racist, not at all," says Kim Winther, who was first assistant director on The Patriot and We Were Soldiers, both of which Gibson starred in. "I never saw him lose his temper, not once. I wouldn't even know what that's like. He was always wonderful, open and great with my wife and kids."

Was Winther shocked when Gibson's outbursts became public knowledge? "Yes. It was a shock to anybody that knew him."

Mel Gibson was born in 1956 in the industrial city of Peekskill, New York, the sixth of 11 children. His father, Hutton, was a railway brakeman until an injury forced him into early retirement. After appearing as a contestant on the American game show, Jeopardy!, Hutton won $21,000 and used the money to emigrate with his family to Australia in 1968, when Mel was 12.

A zealous Catholic, Hutton Gibson went on to found the Alliance for Catholic Tradition, a group which issued several polemics in print, condemning the modernising influence of the Second Vatican Council. Over the years, Hutton has been quoted in the media making outspoken and frequently offensive religious statements – criticising the Pope for being too liberal, insisting heretics should be burned at the stake "as an act of charity", and declaring that the Holocaust was mostly "fiction". His son has refused to distance himself publicly from his father's comments. According to Biskind, it is no coincidence that many of Gibson's films "have an ongoing theme about an authority figure he's rebelling against or who is his mentor".

Paul Sylbert puts it this way: "I think the motives for Mel's outbursts go a lot deeper than people realise. First of all, it's the love of his father who poured all that crap into him."

Growing up, Gibson was indelibly influenced by his father's beliefs. As an adolescent, he considered becoming a priest before one of his sisters applied on his behalf to the National Institute of Dramatic Arts at the University of New South Wales. Gibson got a place and shared digs with Geoffrey Rush. He never graduated, but he landed the lead role in Mad Max in 1979 and then, two years later, gave a critically acclaimed performance in Peter Weir's Gallipoli. Shortly afterwards, following his marriage to Robyn, Gibson went to Hollywood to pursue his film career.

Although Gibson had remained true to the Catholic faith of his upbringing, the fast-living, heady excesses of Los Angeles in the 1980s proved something of a challenge. He became known as a good-time guy with a quick temper who liked a few beers, an impression aided perhaps by the immense popularity of Martin Riggs, his mischievously irreverent alter ego in the Lethal Weapon franchise. "He's a guy who, in a bar brawl, would be one of the people fighting," an unnamed actor was quoted as saying in a People magazine article last year.

It was clear that he struggled with fame. Interviewed by this newspaper several years ago, Gibson said of that time: "Your life takes a dramatic change and you do not know how to handle it. There is no academy, no university that teaches you how to be a celebrity."

Concerns about Gibson's drinking started to emerge when, while filming in Canada in 1983, he hit a car while under the influence and was banned from driving in Ontario for three months. Richard Donner recently revealed that Gibson would "drink a six-pack of beer before he got to work". He became a loose cannon on publicity junkets. In a now infamous exchange with the Spanish El Pais newspaper in 1991, Gibson made a series of inflammatory homophobic comments. "They take it up the ass," he said, pointing to his own rear end. "This is only for taking a shit." He later apologised, claiming he had been drunk on vodka at the time.

And yet, like many alcoholics, his drunkenness through the years was spliced with long bouts of sobriety, lucidity and creative energy. It seemed as though he fell into a cycle of intense bouts of work, followed by a conspicuous fall off the wagon resulting in public embarrassment, private shame and a substantial drying-out period, supported by his long-suffering wife. "He sobered up periodically," says Sylbert, "but you can't be half an alcoholic."

When he was sober, Gibson was extremely generous towards other people he encountered who were also struggling with addiction. At a party in 2001, Ivana Chubbuck recalls Gibson looking after Robert Downey Jr, who was then recovering from years of substance abuse: "Mel was there sponsoring him, making sure he was staying sober. He always had one eye on him. He is a nurturing soul." (In fact, at a time when no studio wanted to cast Downey Jr because of the astronomical insurance costs, Gibson put up his own money to ensure he was cast in The Singing Detective in 2003). Gibson also counselled Britney Spears at the height of her public breakdown.

Nor were his attentions confined to the rich and famous; Chubbuck remembers Gibson offering his guest house free of charge to a homeless musician until he got back on his feet.

"He's a very loyal and tremendously thoughtful guy," agrees Kim Winther. "He takes care of pretty much everyone but himself."

Although he might have presented his best side to his friends and colleagues, others found him far less congenial. In an interview with GQ earlier this year, Winona Ryder recalled crossing paths with a "really drunk" Gibson at a Hollywood party in the mid-90s. "I was with my friend who's gay," she said. "[Gibson] made a really horrible gay joke. And somehow it came up that I was Jewish. He said something about 'oven dodgers'. I'd never heard that before. It was just this weird, weird moment. I was like, 'He's antisemitic and he's homophobic.' No one believed me!'"

It was, in many ways, as though Gibson were living a double life: there was the highly controlled professional who was never late to work… and then there was the man who said awful, insulting things when under the influence. As Gibson started to take on more demanding directorial projects, requiring increasing amounts of time away from home, the two lives collided. And his family life, for so long a stabilising influence, began to buckle under the strain.

When filming began on Apocalypto in 2005, Gibson was on location in the Mexican jungle near Veracruz during which time the set was battered by heavy rain and hurricanes, meaning that the original eight-week shooting period overran to nine months. He hit the bottle again. "I've spoken to people on that shoot and I know it was very difficult because of the alcohol he was drinking," says Benoît Debie. On his return to Los Angeles, Gibson found that Robyn had moved out of their Malibu home with the children. Shortly afterwards, he made his drunken, antisemitic remarks to a police officer.

Unsurprisingly, his friends seek to explain – if not excuse – his behaviour in this context. "It was a drunken outburst to an officer who basically stopped his party and also probably saved his life," says one close friend. Sylbert adds: "I think what happened is that under severe pressure, with his wife leaving him, his alcohol problems came back. At that point, he was loaded up with all sorts of personal problems. In vino veritas, all this anger comes spewing out, and because he's a right-wing Catholic who believes the Jews killed Christ, it's directed at them."

His new relationship with Oksana Grigorieva, a pouting Russian pianist 14 years his junior, did little to help. From the start, Gibson's friends were unsure of her motives, dismissing her as a golddigger. In 2009, he funded and produced a series of music videos for her. One close friend, who has known Gibson for over 20 years, says he was "not remotely surprised" when audiotapes of the couple's rows were leaked. "You just have to look at who's involved and the money she wanted to get out of him," the friend says, referring to Grigorieva, with whom Gibson now has a one-year-old daughter. Grigorieva's spokesman declined to comment.

"I think it started to go wrong when he met Oksana," says Chubbuck. "It's a horrible thing to record someone without their knowledge and of course she sounds rational [on the recordings] because she's the one with the tape on." But surely the things Gibson said were indefensible, no matter what the provocation? "Well, if I think of some of the un-PC things I said in anger, especially when there's children involved, then all bets are off," counters Chubbuck.

Whatever the truth behind those tapes (for a time, Gibson's lawyers claimed they had proof the recordings had been edited), the ugly public spat with Grigorieva seems to be abating. Last month, she dropped her charges of domestic violence against him after Gibson entered what is known as a "West plea" that enables a case to be settled without the defendant admitting guilt. "I ended it for my children and my family," Gibson said in an interview. "I'll take the hit and move on." The couple now share custody of their daughter, Lucia.

"He remains extremely close with all his children," says a good friend. "They have a great relationship and Robyn has also remained very loyal and supportive through this time. He's been sober for a year now."

And he is still, as Sylbert points out, extremely rich. "Whatever the settlement with his ex [Grigorieva] will be, it won't make a dent in it," he says. "He's made oodles and oodles of money. He's a compulsive worker, he's designed that way."

Indeed, Gibson has several movie projects in the pipeline. As well as the forthcoming How I Spent My Summer Vacation, which tells the story of a career criminal who learns to survive jail with the help of a nine-year-old boy, he is set to start filming Love and Honour, a swashbuckling romp written by Braveheart scriptwriter Randall Wallace in the autumn. He also plans to return to directing.

"I spoke to him a few weeks ago and he sounded very up," says Winther. "He said all the bad stuff was a cross to bear but he was not letting it burden him. I got the sense he's a man in control and he knows what he needs to do [and] the movie business is a business that forgives."

Will Gibson have the strength of mind to keep himself on the straight and narrow? Winther believes so: "He's the kind of guy who never gives up."

It remains to be seen whether Hollywood, and the filmgoing public, will give up on him.