Rolling Stone magazine has always had two distinct missions: serving as a droll fanzine for rock ’n’ roll and as an anti-establishment crusader rooted in investigative journalism.

It’s appropriate, then, that its 50th anniversary is being marked with a self-congratulatory TV documentary and an exhaustively detailed memoir that presents founder Jann Wenner as rock’s version of the late political power broker Roy Cohn.

“Rolling Stone: Stories From the Edge,” airing Monday and Tuesday on HBO, assumes the backslapping role by positioning the magazine as the culture’s bravest, most insightful commentator with an all-star staff that dissected the Patty Hearst kidnapping, Elvis Presley’s death, Jimmy Swaggart’s downfall, Ice-T’s battle with law enforcement and George McGovern’s hopeless presidential campaign.

The writers who made those articles sing are heard but largely unseen, with their articles read aloud by Jeff Daniels (and Johnny Depp providing the voice of Hunter S. Thompson).

One scribe not hiding in the shadows is Wenner, who dominates the four-hour running time — Rolling Stone helped produce the film — looking like the hepcat who ate the canary.

The documentary, directed by Alex Gibney and Blair Foster, mentions the magazine’s missteps, particularly its reluctant embrace of hip-hop and the fallout from its poorly vetted 2014 story on campus rape, but Wenner comes across as an honorable character witness, bravely accepting the potshots as part and parcel of being feted at a celebrity roast.

It’s safe to assume that Wenner — who announced this fall that he is selling his stake in Rolling Stone — hoped for just as much respect when he asked former intern Joe Hagan to write his biography. He offered up generous amounts of his time, access to archives and introductions to Mick Jagger, Bob Dylan, Bruce Springsteen and dozens of other marquee names who all agreed to interviews.

But after reading an advance copy of “Sticky Fingers: The Life and Times of Jann Wenner and Rolling Stone Magazine,” the mogul disavowed the project.

You don’t have to dig deep into the 547 pages to see why.

Hagan, a terrific storyteller with a keen ear for killer quotes, clearly concluded that his subject is a bullying, self-centered, double-crossing Lothario whose hunger for fame and fortune trumps any journalistic ambitions.

There are plenty of big stars ready to support this characterization who do so while exposing their own inflated egos.

Paul McCartney, who fumes about Wenner’s preference for John Lennon, still blames the publisher for his yearslong wait to be honored by the Rock and Roll Hall of Fame as a solo artist (it came five years after Lennon’s). Jagger, the magazine’s most frequent cover boy, pouts about not getting more attention.

Even Wenner’s biggest supporters, who include Lorne Michaels, Elton John and Bette Midler, paint him as an opportunist. Dylan is more reluctant to criticize him, but doesn’t say much to build him up, either. Hagan might as well have interviewed a coat hanger.

The author, a contributor to New York magazine and the Wall Street Journal, does praise Wenner for his support of Yoko Ono following Lennon’s death — but only after vilifying the publisher for going against his idol’s wishes and turning their intimate 1970 interview into a book.

Hagan has plenty of explanations for Wenner’s bad behavior, including ice-cold parents and abuse of vodka and cocaine. Prized photographer Annie Leibovitz doesn’t come off much better with tales of her sleeping with many of her subjects and a drug habit so fierce that her dealer would dump her body in front of the hospital.

But Hagan’s favorite target is how Wenner spent decades masking his homosexuality, climaxing with the dumping of his loyal wife, Jane, for current husband Matt Nye. In an early chapter, the author recounts how Wenner hid in a closet during his first LSD trip, a not-so-veiled attempt at a joke.

Jon Landau, a former Rolling Stone contributor and Springsteen’s longtime manager, recently told the New York Times that he found Hagan’s focus on Wenner’s sexuality to be excessive.

“I believe Jann was entitled to expect a little more empathy from his biographer,” he said. “To me it’s a question of degree and tone, and while I can see it from Joe’s point of view — and there is no doubt that Joe is a serious writer and journalist — I think the final product is simply not as fair to Jann as it could have been.”

Landau has a point. Wen­ner’s sex life, however juicy, shouldn’t divert attention from the book’s more important business, as a study of one of the magazine world’s most influential empire builders. Critical, nonapologetic reporting is one thing; fear and loathing are quite another.