Having played Jackie Robinson, James Brown and Black Panther, Chadwick Boseman adds to his repertoire another African-American hero — Thurgood Marshall, the civil-rights lawyer and (later) Supreme Court justice — in the hard-hitting courtroom drama “Marshall.”

Boseman plays Marshall as a 33-year-old lawyer working for the National Association for the Advancement of Colored People. In fact, he was the NAACP’s only lawyer, crisscrossing the country taking up cases of black people put on trial for no reason other than being black. As the movie begins, Marshall is sent to Bridgeport, Conn., to defend a chauffeur, Joseph Spell (Sterling K. Brown), who is accused of raping Eleanor Strubing (Kate Hudson), the wife of his wealthy employer.

Marshall needs a local attorney to vouch for him, and the only one available is Sam Friedman (Josh Gad), an insurance lawyer with no criminal trial experience. But when Friedman petitions the judge (James Cromwell) to allow the out-of-state Marshall to argue Spell’s case, the judge says no — and suddenly Friedman is thrust in the position of giving Spell’s defense, following Marshall’s instructions.

With the straight-arrow prosecutor (Dan Stevens) belonging to the same upper crust as the judge, the case seems hopeless. And Friedman fears the case’s notoriety will ruin his law practice, though he gets some surprising (if under-the-table) support within his synagogue.

The father-son screenwriting team of Michael and Jacob Koskoff structure the story with the twists of a good John Grisham legal thriller. (Michael Koskoff, a longtime Connecticut lawyer, once defended the Black Panthers — not the comic-book character, but the militant activists.)

Director Reginald Hudlin, helming his first feature film in 15 years after a long stretch in TV, balances the outer tensions of Marshall’s civil-rights crusade with the well-paced courtroom theatrics. (One effective device Hudlin uses is the dueling flashbacks of what might have happened, or didn’t happen, to Mrs. Strubing on the night in question.) He also revels in moments showing Marshall as part of the Harlem Renaissance, rubbing elbows with such greats as Langston Hughes (Jussie Smollett) and Zora Neale Hurston (played by Chilli, from TLC).

Like any good courtroom thriller, “Marshall” leaves plenty of room for dynamic performances, and the cast comes through effectively. Gad, better known for comic roles, brings heart to the reluctant hero Friedman. Hudson and Brown (a recent Emmy winner for “This Is Us”) bring shades of tragedy to their roles. But Boseman is front and center, delivering the righteous fury that an old-school biographical drama like this needs.

* * * 1/2

Marshall

Civil-rights icon Thurgood Marshall is profiled in this intense biographical drama, a courtroom story focusing on a case in the young lawyer’s early career.

Where • Area theaters.

When • Opens Friday, Oct. 13.

Rating • PG-13 for mature thematic content, sexuality, violence and some strong language.

Running time • 118 minutes.