NEW YORK — As Chiwetel Ejiofor knows from personal experience, even the most accomplished actors can have moments of crushing self-doubt, when they question their own ability.

When Ejiofor, 36, a British actor known for “Inside Man” and “2012,” first read the screenplay for director Steve McQueen’s “12 Years a Slave,” he knew he was holding a role-of-a-lifetime in his hands — the kind of extraordinary part that actors would kick down doors and jump through hoops to land.

The movie, which opens on Friday, is based on the real-life story of Solomon Northup, a free African-American family man and professional violinist from Saratoga Springs, N.Y., who was kidnapped in 1841, ferried to Louisiana, and sold into slavery.

Already a front-runner in the early Oscar race, the film has the potential to rocket Ejiofor from character actor to bona-fide film star. It’s just the kind of awards bait that Oscar voters can’t resist: a story with a big subject and important themes, told in exacting period detail across a sprawling canvas, with a brave and resolute central protagonist. To top it off, the film’s director, McQueen, is a Turner Prize-winning artist-turned-budding auteur who won warm reviews for his debut film, “Hunger,” more mixed notices for his next, “Shame.”

“I needed a moment to try and work out in my mind whether I could do that, whether I was the person to try and tell this story,” says Ejiofor. His name, Oscar-watchers take note, is pronounced Choo-EH-tell Edge-ee-OH-for.

During a recent sit-down interview, Ejiofor, looking dapper in a dark, fitted blazer and dress pants, proves to be humble, gracious, preternaturally serene, and intently focused on the questions at hand.

He says that his hesitation came not just from self-doubt but a deep sense of responsibility he felt toward doing justice to a real-life man. On top of that, he’d gotten so swept up in Solomon’s harrowing tale and the details of what he had to endure that Ejiofor says he failed to connect closely enough to Solomon himself.

“That’s what I missed when I first read the script,” he says. “My job was to tell the story of Solomon Northup, not the story of slavery. By connecting to him, then all of the rest of the story could be revealed. So it really became a search for Solomon. . . . A lot of the process for me was just trying to find his voice, his psychology, his spirit — and hoping to be touched somewhere in the ether by his soul.”

McQueen, on the other hand, had no such doubts about casting Ejiofor.

“Chiwetel was always the man. I wanted someone who had a certain kind of dignity and a gentleness about him,” says the director. “The character has to hold onto his humanity under the worst kind of duress you can imagine, and he’s tested to the absolute limit. And Chiwetel is one of the few, if only, actors I thought of who could actually hold onto that pressure during the process of the film — even at breaking points. . . . But he went far beyond what I could ever imagine.”

To understand Solomon Northrup, Ejiofor read his landmark 1853 memoir. Among many moving moments in the book, Ejiofor was struck by the line, “I would have gladly given a long year of servitude to have been enabled to exchange the heated oven [of the cotton fields] . . . for a seat in the shade.”

Crystal Shin

Ejiofor, pictured with Michael Fassbender, stars in the real-life story of free man-turned-slave Solomon Northup.

“To have this sort of poetic humility to say, ‘Listen, as bad as it was, these are the trade-offs that I would have given,’ I was amazed at the depth and resilience of somebody to write that, to contemplate that sentiment, after going through this experience,” Ejiofor says. “I suddenly realized that I was dealing with an individual with a unique spirit — to survive this ordeal for this long and then to talk about it in such an eloquent way.”

The film depicts slavery with an unflinching gaze. In its most harrowing tableau, captured largely in a single extended take, Solomon is hung in a noose from a tree branch, with his toes barely touching the mud below. As hours pass, he strains to stay alive by tip-toeing his feet on the ground and gasping for breath — as the other slaves quietly go about their chores, fearful of the repercussions they could endure for intervening.

For Ejiofor, Solomon’s predicament is like a “dark and twisted version” of “Alice in Wonderland,” where a cultured free man with a wife and children has “slipped down the rabbit hole,” he says, and fallen into a world of physical and mental brutality, ever-present fear, and the constant threat of violence. Still, what’s remarkable about Solomon’s story is his refusal to succumb to hopelessness — even as his perspective shifts dramatically over 12 years.

“He finds himself in this terrifying parallel universe,” Ejiofor says. “And the initial question is: How do I get back? But as the net is tightened around him, he starts to realize that this is going to destroy everything about him — his soul, his mind, his heart. And then the real battle begins — for his mind. He starts off in the film believing that he is in a fight for his freedom. But he soon begins to realize that he’s a man who’s fighting for his sanity.”

Coming from an educated background, Solomon could read, write, and play violin. But he soon learned that those talents could be seen as threatening to the slave owners and white men who worked on the plantations. So he sought to keep those parts of himself hidden in order to survive. Therefore, wellsprings of suppressed emotion, largely left unspoken, must be communicated through silent expression alone.

“I spoke to Chiwetel about [Rudolph] Valentino and Buster Keaton, these silent movie stars that could communicate so much with a gaze, with just a look, with stillness. I wanted to hold and pay attention to his eyes,” McQueen says. “Because basically his eyes are witness to these atrocities that are going on around him. We react to him as the audience, because we are him.”

Ruth Fremson/The New York Times

Ejiofor with “12 Years a Slave” director Steve McQueen (right).

Before “12 Years a Slave,” Ejiofor was known to film audiences as a revolutionary in “Children of Men,” a strong-willed drag queen in “Kinky Boots” (now a hit Broadway musical), and an illegal immigrant former African doctor in “Dirty Pretty Things.” Ejiofor has also won raves for his extensive stage resume, including an Olivier Award-winning portrayal of Othello in London in 2007. And he can be seen this month on Starz playing band leader Louis Lester in the miniseries “Dancing on the Edge,” about a fictional African-American jazz band in early 1930s London.

To prepare, Ejiofor visited several plantations in Louisiana and learned to play the violin. He spent time picking cotton, chopping timber, and hacking sugar cane. He also collected other slave stories and researched several large rebellions, including one where hundreds of escaped slaves were slaughtered in New Orleans.

While the actor hopes that the film sparks further dialogue about racial discrimination and slavery, he also believes that “the idea of human dignity and respect really transcends race.”

“Every one of us, regardless of race, is capable of these high points and these incredible low points. So it’s really about, as a collective of people, what do we care about in terms of our fellow man? What do we want for that person? Do we want to subjugate them? Do we want to benefit from them? Or do we want to see them eye-to-eye and progress together?”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.