In this his 30th novel, Walter Mosley (creator of the "Easy Rawlins" mystery series) takes us to the violent streets of Los Angeles and into the brain of 91-year old Ptolemy Grey, who is slowly dying. As is true with so many of Mosley's African-American characters, Grey migrated to Los Angeles from the Jim Crow South. Mosley opens the novel inside Grey's filthy apartment as the aging protagonist is moving toward dementia: "He was used to going places in his mind," writes Mosley. "More and more he was in the past." Through Grey's memory, readers flash back to his childhood and his mentor, Coy McCann, as well as Grey's beloved second wife, Sensia.

Grey's present is downright depressing. He can't go outside alone because he's been mugged by drug addicts. He's helped by a young relative named Reggie, but Reggie is gunned down in a drive-by shooting. It's clear that Mosley is making a larger, sociological commentary about the state of the black family, and how a legacy of racism has decimated it. Grey seeks to redeem his family with gold left behind by the long-dead McCann. Here's where Mosley's plotting gets overly mechanical.

Mosley offers another flashback from Grey's memory: McCann has stolen gold from a rich white man in Mississippi, an infamous racist. McCann then shows young Ptolemy where he's hidden the gold, and makes the boy promise to "take that treasure and make a difference for poor black folks." But McCann is lynched shortly thereafter for the theft, and a now-dying Grey struggles to keep his long-ago promise. Mosley makes it clear that Grey is up against the clock, that "every heartbeat in his chest was like a grain of sand through an hourglass."

Grey gets help and motivation from 17-year-old Robyn, an orphan adopted by a relative. She takes on the Herculean task of cleaning his apartment: "she was filling up bags with old newspaper, clothes, bills, and general trash. She swept up thousands of dead insects." As their relationship deepens, Grey adopts Robyn as his daughter and heir, making arrangements so that his survivors can have the gold for their future. By novel's end, Grey has become a Christ-like figure, sacrificing his own life so that others might be saved.

In Ptolemy Grey, Mosley has created a wonderful character, an old man who swims in his mind between the dangers of the Jim Crow South of the 1930s and the violence of contemporary Los Angeles. While Mosley's story structure can feel mechanical at times, Ptolemy Grey is nonetheless a fully realized and utterly absorbing character, making this novel well worth reading.

Chuck Leddy is a book critic in Boston.