Chiwetel Ejiofor was familiar with the slave trade through his own research before he signed on to play Solomon Northup, the beleaguered hero of Steve McQueen's harrowing drama "12 Years a Slave." Between that background, John Ridley's screenplay and Northup's memoir on which the film is based, the London-born actor had all the material he needed to create his character. Then a trip to Nigeria, his parents' homeland, to make the film "Half of a Yellow Sun" deepened his insight into the history he was about to reenact.

"My last day in Calabar was spent at the slave museum there," he recalls about the Nigeria visit. "My family is Igbo. Hundreds of thousands of Igbos were taken out of there to Louisiana, so I then was able to travel on the journey, that exact line. I spent a day eating okra in Nigeria. I turn up in New Orleans, and I have a plate of okra. You're there."

Northup never made that journey. He was born a free man in Saratoga Springs, N.Y. He was a husband, a father, a musician and a working man in 1841 when he was shanghaied and sold into slavery.

McQueen and Ridley were already at work on a script about a fictional character in similar circumstances when McQueen's wife, historian Bianca Stigter, found Northup's 1853 memoir, a book that created a sensation when it was published shortly after he regained his freedom.

"When I read Solomon's story, that was it," McQueen says. "It's such an extraordinary story that I thought, 'Oh wow, I need to make this.' Every time I turned a page of the book, I saw images."

"12 Years a Slave" is a massive production with a large ensemble cast that includes Paul Giamatti as a slave trader, Benedict Cumberbatch as a relatively benevolent slave owner and McQueen's "Hunger" and "Shame" star Michael Fassbender as Solomon's ruthless final owner, Edwin Epps. The director's most vital casting decision was who would play Northup, and as he read the man's memoir, Ejiofor was the only actor he envisioned.

Over nearly two decades, the 36-year-old Briton has built an impressive career. Ejiofor made his screen debut in Steven Spielberg's drama "Amistad," won a British Independent Film Awards best-actor prize for his role in Stephen Frears' immigrant drama "Dirty Pretty Things" and won an Independent Spirit best-supporting-male award for "Talk to Me."

Other film roles have included "Love Actually," Spike Lee's "She Hate Me" and "Inside Man," Woody Allen's "Melinda and Melinda," "Kinky Boots" (for which he donned drag), "Children of Men" and "Salt." A busy stage actor as well, in 2008 he won the Olivier for best actor for his performance in "Othello."

"He was the man," McQueen says. "I needed someone with a certain kind of grace, a certain kind of decorum, a certain kind of stature in the same vein as, say, Harry Belafonte or Sidney Poitier. Chiwetel, he was the man."

The challenge for Ejiofor was how to approach a role that was going to be both emotionally and physically draining. Solomon Northup was a man who spent a dozen years in the worst kind of hell on earth, brutalized, dehumanized and degraded. When actor and director first met to discuss "12 Years a Slave," they talked about Northup's experience in terms of a fairy tale. McQueen referenced "Pinocchio" and "Alice in Wonderland." It was "Alice" that gave Ejiofor his key into getting into Solomon's skin.

"You slip down the rabbit hole," Ejiofor says. "I suddenly thought that's probably how he viewed it, as more of a kind of surreal science fiction. You feel like you're in one battle at the beginning, but actually you're in a completely different battle. You think you're in a battle for your freedom, but you're actually in a battle for your mind."

To prepare for the role, Ejiofor learned to play the violin, cut sugar cane and picked cotton.

"There is something cathartic about the physical energy engaged in cutting down trees or even sugar cane," he says. "That is really hard. Sugar cane is tough. It's all around you, but there's something about that, whereas picking cotton, there's no catharsis. There's the boiling heat, 108 degrees on our first day of shooting, and you're fiddling with these buds, and they're pricking your fingers, and you're trying to get this thing, and the only point of change is the crack of a whip or somebody passing out."

At the time, Ejiofor recalled a passage from Solomon's book: "But I would have given more years of servitude if they only moved me a few feet into the shade."

"At that moment, that that's when I realized, 'OK, this guy's working on a completely different level,' " Ejiofor says. "He is operating on a level of survival that is so unique, that is so rare that he is bound to get through this, instinctually.

"His instinct told him, 'Life is too precious, life is too joyous, and there is a way back around.' That's why it's such a privilege to play Solomon Northup. It's amazing to play a man like that."