Working conditions at Angola Prison in Louisiana were so harsh that, in 1952, three dozen inmates hacked through their own Achilles tendons with razor blades in protest. They became known as the Heel String Gang. By the time Robert King first arrived at the former slave plantation, 10 years later, armed convicts were working as guards. Incoming prisoners, or "fresh fish", were being sold as sex slaves. Some were raped so violently they died of their injuries. But these horrors formed only part of King's nightmare. For every day of the 29 years he spent in solitary confinement, inside a prison described as the "bloodiest in America", he knew he was innocent.

"It's hard to get dipped in shit and not come out stinking," says King, who walked free in 2001. "But I don't have time to be angry." Two men, Albert Woodfox and Herman Wallace, who were sent down for murder at the same time, still languish in Angola Prison, properly known as the Louisiana State Penitentiary, after 37 years in solitary confinement, the longest period in US history. King, who is now 67, will not rest until they are released: "Will I fight till the day I die? Perhaps I will."

For decades, the men known as the Angola Three have protested their innocence. Their supporters say the case represents one of the greatest miscarriages of justice of our times – one that still shames America. When they fought for the rights of black inmates at the height of the civil rights movement, they were framed for murder, thrown in cells smaller than most bathrooms, and forgotten.

The plight of King and his comrades is the subject of In the Land of the Free, a documentary narrated by Samuel L Jackson and out in cinemas on Friday. King hopes the film, which premieres in London tomorrow, will help his fight for justice. "You throw pebbles in a pond and you get ripples," he says. "I see this as a huge rock."

King has devoted his life to throwing pebbles. He spends two weeks of every month travelling the world, meeting activists, world leaders – anyone who will listen. I first meet him in London in 2008 at an exhibition put on by an artist and supporter. It includes a whitewashed, wooden replica of King's cell. Standing behind its bars, he is taken back to a space from which he never expected to emerge. "I had life and 43 years, and in Angola life is life," he says. "I had hope, but I had to reserve my feelings because I knew I would probably die in prison."

King wears a pair of khakis, a long-sleeved T-shirt and a Kangol flat cap turned backwards. A crude, faded tattoo of a spider peers out from under his right sleeve. It's a souvenir from King's first stint in prison, while he was still in his teens. His route to Angola started in Algiers, a poor ward of New Orleans. Raised by his grandmother (his parents were "off the set"), King's upbringing was marked by poverty and discrimination. "There were laws in place that upgraded some citizens and downgraded others," he says. "I happened to be on the down side – as was my father, and his father before him."

Drawn on to an escalator of petty crime, King was soon doing time in juvenile facilities for robberies he says he wasn't involved in. "Back then, police said, well, you might not be guilty but you was probably there, so ... " Between sentences, a young King found work digging graves and collecting litter to recycle for cash. In 1970, while serving a sentence for another robbery of which he claims innocence, King cracked. He escaped from the Orleans Parish Prison in a bust involving 25 inmates. It did not endear him to the authorities, who recaptured him after two weeks, and threw him into solitary. "I decided I couldn't have any more obligations to a system that had dealt me like that," he says. "I had hoped that the system would be fair but I lost that hope."

Meanwhile, at Angola, Wallace and Woodfox were serving sentences for unconnected robberies. The world's largest maximum security prison, and a working farm to this day, Angola was built in the late 19th century on the site of a plantation, and named after the African country from which many of its slaves were shipped. Guards who worked there in the Seventies have admitted that the trade in sex slaves was allowed to flourish. Between 1972 and 1975, the practice of arming inmates as guards resulted in the deaths of 40 prisoners. Partly reformed today, Angola has 5,000 inmates, more than three-quarters of whom are black. Eight out of 10 of its convicts die behind bars.

Sickened by racial hatred in and out of Angola, Wallace and Woodfox formed a prison chapter of the Black Panther Party, the revolutionary group that rocked America in the Sixties and Seventies. It made them public enemies. When no inmates spoke up after the 1972 murder of a 23-year-old prison guard called Brent Miller, authorities terrorised Angola's black population, and singled out Black Panthers. A prisoner who at first said he had not seen the murder emerged suddenly as a key witness. He fingered Wallace and Woodfox, who were found guilty by an all-white jury and sent to solitary, where they remain. Prints collected at the scene, which belong to neither man, were never tested. Even Miller's widow, Leontine Verrett, is said to be convinced of the pair's innocence.

King, who by now had also joined the Panthers, was moved to Angola soon after Miller's murder. He could expect an earlier release but later learned he was under investigation for the slaying, despite not having been there. The authorities found a better reason to keep him locked up in 1973, when King was charged for the murder of August Kelly, a prisoner who was stabbed to death. King stood trial alongside Kelly's assailant, who claimed sole responsibility for the murder. But witnesses, who would later admit to having given false testimony, put King at the scene. He was found guilty, only to be re-tried in 1975 after it emerged his mouth had been taped shut during the first trial. Despite a mountain of evidence in King's favour, he was found guilty by an all-white jury drawn from the prison community. And so began three decades in solitary.

"You can't get used to anything like that but you have to think about it as part of the territory if you're gonna survive," says King, who shared Angola's Closed Cell Restricted area with Woodfox and Wallace. Talking was forbidden and rule-breakers were thrown in "the dungeon". "They didn't even have a mattress in there or no blankets," King recalls. "Food you got was sometimes just two slices of bread, and you wouldn't get a shower for days. You could get 10 days in there, sometimes 20, sometimes 30, but we were willing to sacrifice a bit just to talk."

Like his comrades, King became schooled in the law and found "escape in sleep", but a sweeter diversion came from an unlikely source. By stacking empty drinks cans to create a stove fired by burning tissues, King used butter packs and sugar sachets, as well as smuggled pecans, to make pralines. Risking stints in the dungeon, he sold his candy to other inmates and made donations to the men on death row. He says: "It was something I could do, and something different I could give people who might never see daylight again – myself included."

King says it required a "change in psychology" to stay sane: "I began to see America as one big prison – that I was in maximum security and that the people outside were in minimum custody." As years turned into decades, the Angola Three risked being forgotten in the hellhole that was the prison. But as word of their plight spread, the scales of justice started to creak. After a complex process of plea bargaining, during which King says the state went to great lengths to avoid a costly and embarrassing lawsuit, he reluctantly accepted a charge of conspiracy to commit murder. On 8 February 2001 he walked free. "I was elated – never scared," he recalls, "but it felt so strange and surreal."

King returned to New Orleans, where he continued to make his pralines (he rebranded them "King's Freelines" and still sells them to raise money for the campaign). Driven out by Hurricane Katrina in 2005, he moved to Austin, Texas, where he still lives with his dog, Kenya.

All possible legal strings within reach have been pulled to ensure that Woodfox and Wallace remain no closer to freedom. When King isn't campaigning or "you know, coolin' out, dilly-dallyin' around", he reflects on what the case of the Angola Three says about race relations in modern America.

At our first meeting, Obama's inauguration was still six months away and King doubted even a black president could bring change. "The politics are too entrenched," he said. "Kennedy tried to change them and was assassinated. Malcolm X was assassinated. If Obama gets elected and isn't assassinated, he might give people the idea America has changed but it won't be true."