By Larry Getlen
July 24, 2014

About 20 years ago, film producer Brian Grazer, known for his work on A Beautiful Mind, Apollo 13 and The Nutty Professor, met some of the biggest names in hip-hop, including Jay Z, LL Cool J, Slick Rick, Chuck D from Public Enemy and Ol’ Dirty Bastard and RZA from the Wu-Tang Clan. While their ages and rap styles were wide-ranging, Grazer found they all had one thing in common: an undying admiration for James Brown, the man whose hits–including “I Got You (I Feel Good),” “Papa’s Got a Brand New Bag” and “Get Up (I Feel Like Being a) Sex Machine”–defined both soul and funk music for generations.

“Every one of these guys brought up James Brown to me, and they all had a story. They weren’t always flattering, but they were always respectful of him as the progenitor of hip-hop,” says Grazer, who at the time was working with another famous Brown worshipper, Eddie Murphy, who impersonated the singer on Saturday Night Live in a bit titled “James Brown’s Celebrity Hot Tub Party.”

Brown was one of the most prodigious forces in popular music. From 1958 to 1986, he landed 116 singles on Billboard’s Hot 100 singles chart, and their irresistible grooves have since been sampled on about 4,000 songs. His life was just as vibrant, from an impoverished upbringing spent partly in an aunt’s brothel to a determined struggle to wrest control of his career from businessmen–a career that fell apart when drugs sapped his judgment and frequently landed him in jail. It was a life too large not to wind up on the big screen.

With Murphy in mind to star, Grazer purchased the rights to Brown’s story in the mid-’90s, beginning a two-decade quest that ends Aug. 1, when Get On Up, starring Chadwick Boseman (42) as Brown, finally hits theaters. Grazer’s first headache was Brown, who wouldn’t sign a long-term deal for the rights, forcing the producer to regularly renegotiate. Then Murphy passed on the role. Grazer spent the next decade commissioning scripts that didn’t quite work and searching for a director. He eventually paired with Spike Lee, but Grazer says they couldn’t agree on a budget. Lee insisted the film be made for $55 million or $60 million; Grazer wanted to spend half that.

Their quarrel became moot on Christmas Day 2006, when Brown passed away at age 73. Grazer lost the rights, seemingly for good this time, as Brown’s estate became mired in years of complex litigation between family members and trustees. Around three years later, the music portion of Brown’s estate came to be managed by Peter Afterman, who also works with the Rolling Stones. Enter Mick Jagger, a movie producer through his Jagged Films banner, who signed on to produce a Brown documentary, Mr. Dynamite, directed by Alex Gibney (which is the subject of negotiations for a pay-TV debut later this year).

When the Stones front man heard about Grazer’s efforts to make a Brown feature film, he suggested they collaborate. Get On Up was back on track. Tate Taylor (The Help) was hired to direct, and the search was on for an actor who could bring Brown to life.

Among those interested was Sean “Diddy” Combs, who paid for an audition tape in which he re-created the extravagant opening of a Brown show. “I thought he was great,” says Jagger. “His take on it was really wonderful and exciting.” But Taylor had seen Boseman play Jackie Robinson in 42 and had a “sixth sense” that he was the right choice. Boseman was apprehensive, because of Brown’s iconic status and his own desire not to jump right into another biopic.

There was another problem with Boseman: he wasn’t a dancer, while Brown’s footwork inspired everyone from Jagger (see sidebar) to Michael Jackson. Taylor paired Boseman with Aakomon Jones, who has worked with Madonna and choreographed the 2012 hit Pitch Perfect. Boseman not only learned Brown’s moves but also devoured the secrets of the legend’s overall physicality, coming to understand what made him one of the greats.

“When you’re watching James Brown, you’re seeing one part of what he’s doing but not all of it. His body’s doing several things at once,” says Boseman. “At the mike, James is conducting the band without looking at them. His intention is always to keep time for the band, so they’re watching his feet. Meanwhile, his shoulders are doing things, along with those foot movements, that are not necessarily what you would do with your shoulders. Then your head is doing something contradictory to what the shoulders are doing. The funk in his movement is coming from the alternating body parts.”

Of course, Boseman also had counsel from one of rock’s great performers. “We sat around and played [Brown’s classic 1963 album] Live at the Apollo,” Jagger says. “We played this very long track, ‘Lost Someone,’ during which he talks to the audience a lot. We closed our eyes and relived that scene and talked about how, in James’ case, a performer gets the audience to respond to his moves.”

When it came to the music, Brown’s estate had some 950 recordings at its disposal, but they weren’t all up to modern recording standards. Production team the Underdogs was hired to “sweeten” the originals with top studio musicians. The film even debuts previously unheard Brown recordings, including live versions of “Please, Please, Please” and “It’s a Man’s Man’s Man’s World,” drawn from never-released recordings of a 1966 concert in Tampa.

The final product is a particular triumph for Grazer, who not only gets to see two decades of diligence pay off but also gets to give the story of a legend its broadest exposure to date. Brown “didn’t go to school for this,” says Grazer. “He had some raw talent and courage, and a sense of self-reliance that powered him to do something beyond what anyone could have imagined. It’s a real American Dream story, and it shows how genius works.”

Contact us at editors@time.com.

This appears in the August 04, 2014 issue of TIME.

SPONSORED FINANCIAL CONTENT

Read More From TIME

EDIT POST