A seasoned literary biographer is tasked with writing the life story of a prickly, reclusive and renowned novelist whose work revels in alter-egos and funhouse transformations of his personal history. That sounds like the plot of a Philip Roth novel!

But in 2012, it happened to Blake Bailey and the subject was Roth himself — the man who helped liberate American Jewish characters from underdog and mensch status; brought adolescent male lust and general bodily functions, pleasures and decay into high-resolution narrative focus; and, with “The Plot Against America,” augured the rise of Donald Trump.

Bailey had written well-received biographies of John Cheever, Richard Yates and Charles Jackson. For his part, Roth had encouraged, then scuttled, a biography by his friend Ross Miller, a literature professor. Roth then flirted with the notion of appointing writer and publisher James Atlas for the project but veered away when he read what he considered to be Atlas’s hatchet job on Saul Bellow. The British biographer and critic Hermione Lee was a good candidate, but the timing was off. Then Atlas connected Roth with Bailey, and the two clicked.

“Why should a gentile from Oklahoma write the biography of Philip Roth?” the novelist asked.

“I’m not a bisexual alcoholic with an ancient Puritan lineage, but I still managed to write a biography of John Cheever,” Bailey counterpunched.

No pushover, this Bailey guy, and his near decade of toil has resulted in a colorful, confident and uncompromising biographical triumph that, at more than 800 pages, also manages to be conversationally readable.

Bailey conveys Roth’s wit and charisma as a handsome, vivacious, all-American baseball-loving kid in the Weequahic section of Newark, a sly undergrad on the make at Bucknell, and a grad student at the University of Chicago discovering both his literary superpowers and his impatience with the posturing, pedantry and theory-mongering of academe. A stint in the Army left him with a bad back injury and a reinforced distaste for petty bureaucracy. Bailey chronicles, too, the surreal launch, with “Portnoy’s Complaint,” into wealth and celebrity, Roth’s activism on behalf of Czech dissident writers and regular acts of generosity, kindness and networking for needy or ailing friends, lovers, students, fellow authors and others.

But this book is decidedly warts and all. No egotistical rant, petty grievance, control-freak overreach or sexual adventure (often with much younger women) goes unnoted. Nor do neurotic reveries like Roth’s imagining his bald pate viewed from a partner’s perspective during oral sex. And by the end of the book, such is the accrual of medical details, you’ll feel like Roth’s internist. Then again, you wouldn’t want someone vague and squeamish writing about the creator of “Portnoy’s Complaint” and “The Anatomy Lesson.” Moreover, this unsparing treatment seems perfectly apt considering that Roth portrayed himself or his counterselves with even more unsparing, unflattering precision.

Most of all, though, apart from his legendary discipline as a tireless multi-draft-hewing craftsman, Roth’s odysseys — good, bad and ugly — revolved around women. He has been tarred by some feminists as misogynistic. But Roth argued — and Bailey offers substantial evidence for the defense — that the novelist’s most serious problems weren’t with all women but with two particular women: the ones he had the misfortune to marry.

His first wife, Margaret Martinson Williams, was deeply unstable, and though he tried to exorcise the trauma of that relationship in his fiction, he never did, and she haunted him to his grave. His marriage to the actress Claire Bloom was a more decorous disaster. In one episode, she came to see him at a psychiatric unit, where he was being treated for depression during one of his many attempts to distance himself from her. She became so distraught during the visit that she was admitted there, too. You get the idea. Their marriage was an Edward Albee play.

Roth tried to suggest the slow torture of it through the character of Eve Frame in “I Married a Communist,” and more directly in a lengthy written rebuttal to Bloom’s memoir “Leaving a Doll’s House.” He ended up, on friends’ advice, not publishing that rebuttal, but it powerfully informs Bailey’s depiction here. Suffice to say that there are at least two sides to every story.

Bailey doesn’t bow and quake before each of Roth’s dozens of works. He reminds us that the master’s output was largely and often deservedly ignored during the ’70s. And he is quite chilly toward the slim “Nemeses” novels of the 2000s. For instance, “The Humbling” Bailey judges “an enervated performance” as if Roth is “only too conscious of writing a bad novel about not being able to write anymore.”

But Bailey celebrates the great works — some of the Zuckerman novels, the memoirs and pseudo-memoirs in farcical, tragic or hybrid blends; the American Trilogy (particularly “American Pastoral”); and perhaps, above all, the fabulous, filthy, Rabelaisian extravaganza “Sabbath’s Theater.” Roth won every major literary award except the Nobel, and that omission became an embarrassment not to Roth but to the committee, which one observer suggested was “full of out-of-touch Swedish prigs.” Roth quipped in an interview with a Swedish newspaper that the Academy might have bent had “Portnoy’s Complaint” been titled instead “The Orgasm Under Rapacious Capitalism.”

Bailey’s will be far from the final word on Roth, whose depictions of women and attitudes on race, for starters, arguably merit further discussion. (Whether he was “good for the Jews” does not, and let’s hope that tiresome wrangle is truly behind us.)

Still, no one writing about Roth will be able to sidestep this foundational biography. If nothing else, Bailey’s book is a crucial decoder ring for deciphering the byzantine layers of who became what in Roth’s romans-à-clef.

Don’t expect facile answers to emerge from any of those future investigations. “Well that’s settled” is not a phrase ever uttered in relation to this author’s work. Roth’s flawed, scarred, madly seeking characters are decidedly flesh and blood and, as Bailey marvelously reveals, so was their creator.

Once a journalist complained to Roth that he was “extremely difficult” to interview. Roth laughed and said, “I wasn’t put on this earth to make your life easy.”

Alexander C. Kafka has written about books and the arts for The Washington Post, the Boston Globe and other publications.

Philip Roth

The Biography

By Blake Bailey

W.W. Norton. 898 pp. $40