When Rami Malek was originally cast to play Freddie Mercury in Queen biopic “Bohemian Rhapsody,” (opening Friday), he knew little about the lead singer beyond his music and peacockish performance style.

“I think the man, to me, is a revolutionary,” Malek told 48 Hills. “He allowed his art to speak for itself. He went out there and he [gave it his all].”

But the Emmy-winning “Mr. Robot” actor knew that approaching an accurate portrayal of the man behind the mic—for a movie that traces the British arena rock band’s upward trajectory from its formation in early ‘70s London to its unforgettable Live Aid performance at Wembley Stadium in 1985—would require immense investigation.

Through Malek’s research, along with invaluable insights from on-set consultants and former Queen members Brian May and Roger Taylor, the actor uncovered that underneath all the projected self-confidence lay an insecure soul who struggled to fit in. This was something that Malek, born in Los Angeles to Egyptian parents, says he could instantly relate to.

Gwilym Lee (Brian May), Rami Malek (Freddie Mercury), and Joe Mazzello (John Deacon) star in Twentieth Century Fox’s BOHEMIAN RHAPSODY. Photo Ccourtesy Twentieth Century Fox.

“I could understand that story—that immigrant story of trying to solidify yourself in a country that’s foreign to you and foreign to your parents,” Malek said. “What’s more, having a dream and marshaling everything you’ve got inside of you to see it realized when the decks are stacked against you.”

Freddie Mercury grew up Farrokh Bulsara to Parsi parents on Zanzibar, an archipelago in the Indian Ocean, just off the coast of East Africa as well as in India before relocating to Middlesex, England, in his late teens. Although he wasn’t Anglo, conventionally attractive, or heterosexual at a time when homosexuality was still criminalized, he would use his otherness to his advantage.

His massive overbite reportedly gave him his four-octave vocal range and that, along with his immense flamboyance onstage with Queen, earned him legions of fans. His sophisticated songwriting won the band numerous hits, including “Killer Queen,” “Bohemian Rhapsody,” “Somebody to Love,” “We Are the Champions,” “Don’t Stop Me Now,” and “Crazy Little Thing Called Love.”

To match Mercury’s struts, punches, and microphone swings in Queen’s most iconic shows, from their first televised staging of “Killer Queen” on BBC’s “Top of the Pops” to their indelible Live Aid performance watched by 1.7 billion people worldwide, Malek met and studied with a movement coach. He also had to work to build the stamina that it would take to recreate the band’s 20-minute Live Aid set.

Gwilym Lee (Brian May), Ben Hardy (Roger Taylor), Rami Malek (Freddie Mercury), and Joe Mazzello (John Deacon) star in Twentieth Century Fox’s BOHEMIAN RHAPSODY. Photo courtesy Twentieth Century Fox.

Seeing what went into these highly theatrical performances only increased Malek’s respect for the singer, in addition to discovering all that he had to overcome—hiding his homosexuality and later his HIV status at a time when AIDS was a death sentence—in order to fulfill his dreams.

“This is what I really admire about him,” Malek said. “He was a very, very conflicted human being searching for identity—and not only his personal identity and sexual identity, every aspect of it. In doing so, and despite having a massive overbite, being an immigrant with a name that many people couldn’t pronounce, and being bullied as a kid, he found a way to harness all of those things and still have this confidence and power that just exploded out on stage.“

After Mercury succumbed to the plague, six years after the events in the “Bohemian Rhapsody” film, it was important to his surviving Queen band members that his untimely death at the age of 45 not be in vain. So, along with their manager Jim Beach, they founded The Mercury Phoenix Trust to raise money for AIDS research and charities.

Today, Malek, inspired by Mercury’s struggle, is picking up the mantle for the cause and supporting both The Mercury Phoenix Trust and Bono’s (RED) organization.

“It really moved me gravely to a point where I got involved because I think that the younger generation doesn’t quite understand what a death sentence AIDS used to be, and everyone needs to be educated about it,” Malek said. “Obviously the AIDS pandemic still exists today, and we all need to marshal everything forward to make sure that we can eradicate it.”

Opens on Nov. 2 in San Francisco
More info here.