It may be useful to think of David Baldacci’s Memory Man” as a master class in the art of the bestseller. Starting with “Absolute Power” in 1996, Baldacci has in less than 20 years published an amazing 30 novels, almost all of them bestsellers. That’s not to say his thrillers are all equally pleasing. I read “Hour Game” in 2004 and thought it so bizarre that I swore off his work until this one came along. Happily, “Memory Man,” although strange in some ways, is both interesting and highly entertaining. It’s big, bold and almost impossible to put down.

There are several routes to the top of the list. Some bestselling authors — Michael Connelly, say, or Richard Price — write realistic novels and write them so well that they attract a large audience. Others lure readers with plots and characters that are implausible, sometimes wildly so, but also fun. The Baldacci books I’ve read have tended that way — toward the fanciful, sometimes seriously over the top. I gave up on “Hour Game” when, during a climactic shootout, Baldacci gravely informed us, “Beating odds of probably a billion to one, the two bullets had collided.” We all have our limits.

“Memory Man” has its improbable moments, but all in all the author’s fertile imagination makes it a winner. His new hero, the Memory Man of the title, is Amos Decker, a detective in a small town in the Midwest who comes home one night to find his wife and 9-year-old daughter slaughtered. Overcome by grief and rage, he almost kills himself but decides instead to live for revenge.

We rejoin Decker 16 months later. The murders remain unsolved. He has quit the police force, lost his home and car and been homeless for a time, but now he’s working as a private investigator and living in a motel. One day the police tell him that a man has confessed to the murders. The confession proves illusory.

Then a masked intruder kills eight students and teachers at the local high school, the one that Decker, 42, attended. The police invite Decker to join the investigation. There’s evidence that the murder of his family and the rampage at the school are connected. The killer starts leaving messages that taunt Decker and make clear his or her hatred of the detective.

“Memory Man” by David Baldacci. (AP/Grand Central Publishing)

What follows is both convoluted and captivating. We learn that Decker is one of the most unusual detectives any novelist has dreamed up. After playing football in college, he tried out for a professional team — only to be blindsided in his first game by a vicious hit to his head. He fell to the ground unconscious and for a time was legally dead. When he recovered, his brain had been rewired. Tests revealed that he had become, in clinical terms, “an acquired savant with hyperthymesia and synesthesia abilities.” His injury gave him “one of the most exceptional brains in the world.”

Decker now has total recall. Anything he has ever seen or read, at any point in his life, he can remember. His analytic powers far exceed those of most mortals. It’s also true that he is no longer concerned with other people’s feelings or with love or kindness. He’s a brilliant machine who returns to his home town and joins the police force. He is a superhero detective, and much of the fascination of “Memory Man” comes from his being pitted against an enemy who is his intellectual equal and hellbent on Decker’s destruction.

Probable? No. Fun? You bet.

I called this novel a master class on the bestseller because of its fast-moving narrative, the originality of its hero and its irresistible plot. Yet the author lures us in other ways as well. Often I thought myself a few steps ahead of Decker in puzzling out who the villain might be. I wasn’t, of course, and that made me wonder if it might be the mark of a really smart novelist to let readers sometimes think we’re smarter than we are. Also, Baldacci has a disconcerting habit of describing characters — not all of them villains — as alarmingly unattractive, with bad teeth, bad skin, deformed limbs and more. Why? I haven’t a clue, unless he has divined that some book buyers enjoy reading about people less attractive than themselves. All’s fair in this game.

Decker still mourns his wife and remains chaste in this story, but Baldacci introduces an attractive young reporter who enlists in the troubled detective’s search for the killer. This may hint at a romance in Decker’s next adventure, one that could only make this hugely commercial saga even more so.

Anderson regularly reviews mysteries and thrillers for The Washington Post.

MEMORY MAN

By David Baldacci

Grand Central. 405 pp. $28