The life of a writer is usually about as exciting as sharpening a pencil. We make many small efforts, turns or scrapes, and eventually, we hope, get to a point. Along the way, we constantly ask ourselves, “What if?” What if our lives were as exciting as those of our characters? What if we were given the opportunity to sell our souls for fame and fortune? Those questions, in a nutshell, lie at the heart of Adam Langer’s witty literary thriller, “The Salinger Contract.”

Like all good crime novels, Langer’s latest is a puzzle. At its core is the daring theft of a diamond-encrusted zip drive containing a valuable manuscript. This pricey doodad is merely the McGuffin — a device to start the plot rolling — but it serves to power a madcap examination of creativity, greed, the value of art, the insatiable ego of writers, and the craziness of the publishing world today.

Langer’s latest features a writer, also named Adam Langer, whose career is stalled. With one semi-autobiographical novel under his belt, the fictional Adam has given up his job at a New York literary magazine to follow his academic wife to a tenure-track teaching position in Indiana. But despite his unemployed, house-husband status, the only writing Adam ends up doing OVER A DECADE is a nasty, funny fictionalized blog about his wife’s colleagues, which ends up threatening their livelihood.

Into this turmoil walks an old acquaintance, an author Adam admires and had profiled in his magazine. That author, Conner Joyce, writes thrillers known for their impeccably researched details but that no longer sell enough to keep his publisher happy — or interested. The two bond over the fate of the so-called midlist author, building what appears to be a real friendship and prompting Adam to do some soul-searching about his creative limitations.

Get The Weekender in your inbox:

The Globe's top picks for what to see and do each weekend, in Boston and beyond.

But Conner has his own motives for cultivating a relationship with Adam. Over a series of clandestine visits, he spins a tale about a wealthy literary connoisseur who pays a king’s ransom to certain authors willing to write novels exclusively for his collection, a deal Conner has decided to accept.

THE SALINGER CONTRACT

Author:

Adam Langer

Publisher:

Open Road

Number of pages:

269 pp.

Book price:

$16.99

This yarn — if true — may explain why some of the friends’ shared literary heroes (such as J.D. Salinger) appeared to stop writing and became recluses. It also may offer Adam a way out of both creative inertia and financial insecurity. Then again, it could be a demonic bargain — or a total fabrication. Conner, after all, is a masterful creator of realistic plots. Adam’s mission involves sorting it all out.

What follows could be precious, a self-conscious tale within a tale within a tale. In Langer’s hands, it works. Borrowing freely and openly from John Le Carré, among others, he has crafted the kind of novel in which everything has a place, and even the most minor characters have a role.

Langer — the real author — is also very funny, with a playful command of language that nearly sends his oh-so-flawed protagonist namesake over the deep end as he mulls over “big book contracts, unpublished Salinger manuscripts, nefarious skullduggery, and cockeyed flumdummery.”

Like Langer’s last novel, “The Thieves of Manhattan,” “The Salinger Contract” spoofs contemporary publishing. In the previous book, Langer took on the industry’s hunger for memoirs, real or faked. This time out, he focuses on the frenzy for so-called “franchise” authors, even when those bestsellers are foul-mouthed, semi-literate creeps. (“The story’s what matters; spelling’s overrated,” says one superstar, punctuating her statement with an obscenity.)

Underneath all this action is the basic writer’s fantasy: that the world will need one’s books and will somehow be diminished without them. The usual reality, as both Conner and Adam know, is the opposite. Many writers labor for years, only to have their works published to deafening silence. How sweet is this fantasy, then? It’s diamond-encrusted fun, even for nonwriters.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.