Writers of popular mystery series run a considerable risk if they change their game, since the books’ popularity is due in no small part to their predictability.

Arthur Conan Doyle found that out the hard way when he attempted to kill off his star detective, Sherlock Holmes, and if he’d gone one step further — if he’d replaced Holmes with, say, a crime-solving London Underground attendant and his pet cat — he’d have been garbage-pelted in the street.

Mystery readers have known for years that the prolific Ian Rankin is a good writer, and with his new novel, “The Impossible Dead,” they have evidence that he’s a brave one, too, because this is the second time in two years that Rankin has written about somebody other than his own Sherlock Holmes: Detective Inspector John Rebus.

The 19 books featuring the acerbic, alienated Rebus have achieved for Rankin a front-row status among mystery authors, a well-deserved reputation for elegant, descriptive minimalism, and a main character chipped with a chisel rather than painted in pastels. Leaving that character behind runs the risk of leaving that reputation behind as well.

Nevertheless, here we are outside Rebus territory (though still in Rankin’s love-hate Edinburgh) in “The Impossible Dead,” the second book featuring Inspector Malcolm Fox from the Office of Complaints and Conduct. To the police force whose corrupt members they investigate, Fox and his colleagues are known as the Complaints. The complaints the Complaints handle represent the usual underside of all large police forces: improper procedures, brutality, crimes and officers covering up crimes.

“The Impossible Dead” by Ian Rankin (Reagan Arthur)

Neither Fox nor his teammates, Tony Kaye and Joe Naysmith, are much liked by the rest of the force. When they’re called to the gritty seaside precinct of Fife to probe the testimony of three cops who swore in court to the innocence of a fourth, Detective Paul Carter, the Complaints office meets with every form of resistance short of a lynch mob.

The case at first seems unsavory but uncomplicated, which pleases Kaye, Fox’s clock-watching second in command. Detective Carter has been accused of abusing his authority to solicit sex from female suspects, and one of those accusations comes from Alan Carter, Paul’s uncle and a retired cop.

In the court investigation that followed, three of Carter’s colleagues gave equivocal testimony, and Fox & Co. have been dispatched to question the trio a bit further. Kaye is hoping they can wrap up the whole thing in short order. Fox’s reactions are more world-weary: “He knew he could put the investigation into cruise control, could ask the questions, log the responses and come to no great conclusions. . . . So what was the point of busting a gut?” The heroes we follow down these mean streets may not be able to answer that question, but they do the right thing anyway.

In “The Complaints,” the first book in this new series, Fox was described as a bear of a man, “slow but steady, and only occasionally to be feared.” His personal life ticks through the grim checklist that seems to have spread like a virus from Scandinavian crime fiction: He has a drinking problem, an ex-wife, a troublesome sister, a father battling the onset of senility, etc.

His colleagues make little effort to understand him, and in “The Impossible Dead” we get our best insights into his character from one of the book’s best characters, Evelyn Mills, Fife’s one-woman counterpart to Complaints — and a former lover of Fox’s. Most of Rankin’s female characters are one-note, walk-on caricatures of a type that shouldn’t have survived into the 21st century, but even in her brief appearances, Mills intrigues the reader enough to raise the gasp-inducing thought of a third Rankin series.

The plot of this present novel (it’s not necessary to read “The Complaints” first) grows more complicated when kindly Uncle Alan Carter is found dead. It’s an apparent suicide, but Fox learns that the old man had been investigating the mysterious decades-ago death of a close friend of Fox’s father. Rankin juggles all of these plots with consummate ease and brings the whole thing to a truly exciting conclusion.

This is lean, addictive stuff, and it will leave even the most diehard Rebus fan wanting more.

Donoghue is managing editor of the online magazine Open Letters Monthly.

the impossible dead

By Ian Rankin

Reagan Arthur/Little, Brown. 391 p. $25.99