Newton Knight, the Mississippi-farmer-turned-Confederate-deserter-turned-guerrilla-leader played by Matthew McConaughey in “Free State of Jones,” is a historical figure of some controversy. He’s regarded by many as a heroic freedom fighter; some think of him as a reckless criminal. (The divide in opinion, no surprise, tends to fall along North/South lines.) But in “Free State of Jones,” a Civil War drama written and directed with more doggedness than excitement by Gary Ross, there is never much doubt about the kind of man that Newton Knight is. He’s Kevin Costner in “Dances with Wolves” crossed with a saintly Marxist professor crossed with a white version of Malcolm X. For all the ravaged surface appeal of McConaughey’s performance, the character is a little too good to be true, but then, that’s just the sort of movie “Free State of Jones” is. It’s a tale of racial liberation and heroic bloodshed that is designed, at almost every turn, to lift us up to that special place where we can all feel moved by what good liberals we are. The historical events exert some ongoing interest, but the treatment is pious and stiff-jointed enough to leave you wondering what a two-hour-and-19-minute drama that never begins to attain the moral urgency and fascination of something like “Glory” or “12 Years a Slave” is doing being released in the middle of the summer. Box-office prospects don’t exactly look rousing, since the film itself simply isn’t rousing enough.

In 1862, when “Free State of Jones” begins, Newton Knight is just an anonymous battle-weary medical nurse, up to his elbows in carnage, who ducks out of combat to take the corpse of a young neighbor home for a proper burial. Once there, however, he sees Confederate soldiers looting local farms, and his witnessing of this minor outrage fuses with his already testy anger over a new law that exempts the oldest sons in Confederate households from military service, as long as their family owns at least 20 slaves. (If they own 40, then two sons are exempt.) It’s a law designed to protect rich men, and that’e enough to make Knight question what he’s warring for. “I’m tired of helpin’ ’em fight for their damn cotton,” he says — a line that, perhaps, calls a little too much attention to its contemporary topical relevance. (All that’s missing are subtitles stating that the Iraq war was really fought for oil.) Newton’s standoff with the looters leads to his desertion from the Confederate Army, and he winds up hiding in the Mississippi bayou, along with half a dozen former slaves, who become the genesis of his newly formed fighting force. It’s his rebellion against the Southern rebellion, but it’s not just a combat unit. It’s a ragtag band of idealists, a community, with Newton as its commander, moral compass, and spiritual guru.

One way to characterize the McConaissance is to say that it was all about Matthew McConaughey going into the darkness. In his cheesy, star-has-fallen period, he was all sweetness and light — the dimply narcissism, the good-ol’-boy charm so relentless that it had begun to verge on smarm. But in movies like “The Lincoln Lawyer” and (especially) “Magic Mike,” where he began to let bits of sleaze and sinister manipulation ooze through the cracks of his aging pretty-boy glamour (a journey that culminated in his staggering performance on “True Detective”), McConaughey began to dance between the angelic and the demonic, and it liberated him as an actor. Of course, he also won the Oscar for playing a scoundrel with a heart of gold in “Dallas Buyers Club,” and that has a way of influencing the kind of roles you take.

In “Free State of Jones,” his Newton Knight is a figure of enlightened valor who has left any shades of moral ambiguity behind. Yet McConaughey has become so skilled at portraying sinewy desperation that he takes even a badass plaster saint like Knight and gives him an ornery intrigue around the edges. Gaunt and reserved, with cold staring eyes and a scraggly black beard, he makes Knight a ravaged desperado, a Southerner of primitive Old Testament faith who’s looking for somewhere to invest that belief, since he can no longer find a place for it in the Confederacy. In the bayou, when he meets Moses (Mahershala Ali), a former slave with a spidery metal guard that’s been bolted around his neck, it taps right into the depths of his human decency. A former blacksmith, Knight volunteers to remove the guard with a hammer and wedge — but the clanging sound is destined to bring on the soldiers and their dogs. So he and Moses and the other runaway slaves get ready to take up arms.

The film builds up a fair amount of curiosity about how Knight is going to succeed with his insurrection, given that the entire Confederate army of Mississippi is arrayed against him. But “Free State of Jones” is one of those historical dramas with a script that’s big on crowning lines of moral fervor and not so big on nuts-and-bolts detail. At several points, Ross employs real Civil War photographs (with explanatory titles) to advance the story, and after the film uses one of these shots to tell us that in July, 1863, Confederate desertions were on the rise, we cut to Knight’s woodland guerrilla army — and it’s suddenly a force of 100 people, all united in their renegade passion. I’m not sure that the film ever quite recovers from this short-handed piece of exposition.

How does everyone under Knight’s command get along? More or less famously. There’s a fiddle-music montage of a corn-and-roast-pig picnic, and we always know when we’re supposed to stop and hiss, because the Confederate baddie Lt. Barbour (Bill Tangradi) shows up, in his George A. Custer decadent blonde ringlets. Knight’s army, by contrast, is a racially and sexually integrated paramilitary utopia. It includes a handful of women who can shoot a rifle as well as any man, and although most of the group is comprised of former Dixie soldiers, there’s almost no friction between blacks and whites. The way Ross presents it, it’s really a Southern aristocrat’s war in which every one of the Confederates who’ve dropped out can see right through the illusion of why they were ever asked to fight. (It’s all about the cotton, man! And the one percent.) The only instance of racial tension within Knight’s army comes when a soldier calls Moses the N-word, and Moses simply replies, “How you ain’t?” By which he means: How you ain’t a n—-r? — since all of them, black and white, are being exploited by the very same forces. One truly has to wonder whether a conversation like this one ever took place in 1863.

As Knight’s rebellion grows, it takes over the southeast portion of Mississippi, including Jones County, which Knight declares to be “the free state of Jones.” It would seem as though his declaration applies to matters of the heart as well. The film recounts the story of his relationship with a former slave, Rachel (Gugu Mbatha-Raw), whom he teaches to read and fire a gun, and who ultimately bears his child. The film’s portrayal of biracial harmony is admirable and touching, yet the staging of this love story is far too decorous and restrained, even when Knight’s wife, Serena (Keri Russell), and Rachel wind up sharing the duty of raising Knight’s baby son. In reality, Knight had five children with Rachel, who became his common-law wife, and nine children with Serena, and he lived with both families on adjoining properties. That story would have made for a fascinating movie, much more so than the tale of predigested enlightenment and generic idyllic romance that is “Free State of Jones.”