After 30 years and 21 novels, John Rebus, the detective inspector at the center of Ian Rankin’s popular mystery series, is still fighting crime — despite two serious problems. Folr one, he’s overweight, tires easily and has alarming fits of coughing. Also, he’s too old for police duty, a civilian who can only inject himself into cases with the help of friends on the force.

"Rather Be the Devil," by Ian Rankin (Little, Brown)

In Rankin’s new novel “Rather Be the Devil,” Rebus steals an identification from a detective to pass himself off as a real cop. Another time, he snaps at the detective superintendent, “Is your head full of f-----g mince?” whereupon he’s marched out of police headquarters.

Still, he hangs on. The idea is that Rebus is such a brilliant detective that only he can solve the crimes that beset Edinburgh. You can think that if you want to. But Rankin makes a less-than-convincing case in this disappointing novel. I found nothing in these pages more suspenseful than whether Rebus, who may have cancer, would survive it. (While tests are underway, Rebus’s romantic interest, coroner Deborah Quant, gives him a glass jar containing “a section of lung, showing the bronchial tubes,” to remind him to be good. They’re a fun couple.)

And what are the crimes here? Well, at the outset a gangster named Darryl Christie is badly beaten outside his home. But by whom? The suspects include Gerald “Big Ger” Cafferty, a gangster and longtime antagonist of Rebus. And there’s another gangster, Joe Stark, to whom Christie owes money. “Money or your head,” this one warns.

Meanwhile, Rebus is obsessed with the unsolved case of a beautiful woman who was strangled in her hotel room nearly 40 years earlier. The suspects include her wealthy banker husband, several of her lovers and a rock star she’d met the day she died. Rebus interrogates the aging husband as well as the husband’s sister, whose fiancee drowned, perhaps murdered, in the family swimming pool years earlier. There’s also the question of whether the banker embezzled millions of dollars and whether a murderous Ukrainian gangster is coming to claim the money. And Rebus’s investigation of the woman’s slaying leads him to an ex-cop who worked the case and is murdered soon after he talks to Rebus. All of this becomes extremely confusing.

The author Ian Rankin (Hamish Brown)

The novel features several of Rebus’s friends on the force whom we know from earlier novels, including Inspector Malcolm Fox, whose drug-abusing sister owes gangster Christie a small fortune thanks to her addiction to his slot machines. The gangster offers to write off the debt if Fox will hand over police secrets. Fox debates whether he should do that, sell his house to pay the gangster or risk serious punishment being inflicted on his sister.

The book has its dramatic moments. One chapter begins with a very respectable citizen inexplicably running naked down the street as passersby snap photos. And a vengeful man armed with a huge sword — a veritable scimitar — threatens to chop off a rival’s head as a warning to others. Rebus even gains a confession in the woman’s long-ago murder. But the novel simply has too many characters and too much going on. I despaired of keeping things straight — and I was taking notes. Rankin has done better in the past and no doubt he’ll do better in the future. Let’s hope.

Patrick Anderson regularly reviews mysteries and thrillers for The Washington Post.

Ian Rankin will be at Politics and Prose, 5015 Connecticut Ave. NW., at 3 p.m. on Feb. 12.

rather be the devil

By Ian Rankin

Little, Brown. 320 pp. $27