When Kurt Cobain played the finished version of the Nirvana album “Nevermind” for his mother, Wendy O’Connor, in the summer of 1991, she almost cried. Not so much out of joy, but out of fear.

Sensing it was a game-changer for the as-yet-undistinguished punk group, she told her son, “You better buckle up, because you are not ready for this.” As the new film “Kurt Cobain: Montage of Heck” explores, she was tragically on the nose.

The documentary — authorized by O’Connor, as well as Cobain’s widow, Courtney Love, and his daughter, Frances Bean Cobain — is, without a doubt, the most painfully detailed account to date of the singer’s life.

It examines his troubled youth, growing up in the logging town of Aberdeen, Wash., in a way that artfully melds Cobain’s journals, voice recordings and drawings.

Also dissected is the rise of Nirvana from underground curiosity to household name in the space of a few months — and the heartbreak, public scrutiny, health problems and drug addiction that ultimately led to Cobain’s 1994 death, at the age of 27, by self-inflicted gunshot.

The film premieres at the Tribeca Film Festival on Sunday, opens in theaters Friday and airs on HBO May 4.

Director Brett Morgen was first approached about the movie in 2007, as Love was a big fan of his 2002 doc, “The Kid Stays in the Picture” (about Hollywood producer Robert Evans), and provided unseen personal footage.

Morgen also gained access to videos and photos of Cobain as a child from O’Connor, but it’s Love’s trove that offers the biggest window into Cobain’s post-fame life and mindset, revealing a rail-thin recluse living in squalor and willfully descending into drug addiction.

The speed of Cobain’s rise to fame was a major trigger to his destruction. The September 1991 release of “Nevermind” was, as O’Connor predicted, a turning point.

As the single “Smells Like Teen Spirit” raced up sales charts all over the world that year and into 1992, the singer’s initial euphoria was replaced by anxiety.

“The [band’s] lives were maniacal, and Kurt’s face was everywhere,” Kevin Kerslake, who directed four of the band’s videos, tells The Post. “So when we talked about doing the video for ‘Come as You Are,’ almost the only thing that he told me was that he didn’t want to be in it. To me, that screamed ‘Get me out of here.’”

That’s exactly what Kurt did, withdrawing from interviews and opting not to tour for most of 1992 — at a point when Nirvana was the most in-demand band in the world.

“He wanted to stay in the apartment and do heroin and paint,” notes Love matter-of-factly in the film. In home-video footage from that period, Cobain has terrible skin, looks horrifically gaunt, and both he and Love appear to care little about the disgusting conditions around them.

A brief respite came with the arrival of Frances, born in August 1992.

“Having Frances gave him more pleasure than anything in his life,” Charles R. Cross, who knew the musician from the Seattle music scene and who wrote the Cobain biography “Heavier Than Heaven,” tells The Post.

That happiness comes across in “Montage of Heck” via sweet sequences of a smiling Cobain playing with his baby daughter, whose birth inspired him to make a concerted effort to clean up.

But as the film outlines, the musician’s drug usage continued, due in part to a painful, undiagnosed stomach complaint that had bothered him his entire adult life.

One particularly harrowing scene features Cobain nodding out as he attempts to hold Frances still for a haircut. “I’m not on drugs,” he protests weakly, even though it’s clear that he’s lying.

Life under the media microscope added to his sense of alienation, particularly after journalist Lynn Hirschberg wrote a 1992 Vanity Fair profile that alleged Love used heroin while pregnant.

Love actually admits to the drug use in “Montage of Heck,” but at the time, the story left Cobain feeling “violated” and resulted in Frances being briefly removed from the couple’s custody.

Love also offers a surprising new revelation in the movie, confessing that she considered having an affair.

“I’m a big flirt — I flirt with chairs,” says Love. “I never, never cheated on him, but I certainly thought about it one time in London.”

She adds that Cobain sensed the possibility of her straying, and it may have triggered his March 1994 suicide attempt.

But as engrossing as “Montage of Heck” is, with its compelling interviews and unprecedented access, Cobain’s friends and collaborators claim it’s far from the whole story.

Cross, who documented Nirvana’s rise as editor of Seattle music publication the Rocket, feels something often missed in examinations of Cobain’s life is his fear of poverty.

The feeling was renewed for the singer when director Kevin Kerslake sued Nirvana over allegations of copyright infringement related to the 1993 video for “Heart-Shaped Box.” (The suit was settled out of court after Cobain’s death.)

“What he told his drug counselors was that his biggest fear was losing his money from a court case,” Cross says. “He’d been on the street as a kid, so the idea of going back to that was horrifying.”

The overwhelming sentiment throughout the second half of “Montage of Heck” is that Cobain was tortured, especially in the final years of his life. But the singer’s friends and confidantes recall a man with a very funny side.

“His whole life was based on humor and sarcasm,” Cross explains. “But it gets lost because it’s hard to capture that without encountering the real person.”

The frontman definitely didn’t shy away from practical jokes.

Once, during the recording of third album “In Utero” in 1993, Cobain, bassist Krist Novoselic, drummer Dave Grohl and producer-engineer Steve Albini put in a prank call to Evan Dando of the Lemonheads, pretending Madonna was waiting to speak to him.

Albini posed as a member of Madge’s staff, with the rest of the band listening in; Dando fell for it and waited as they simply left him dangling on the line for five minutes.

It didn’t just play out in private, either. During a 1993 Halloween show in Ohio, Cobain took to the stage in a giant Barney suit. “I remember he took the tail and taped it under his legs to make it look like a d–k,” Grohl told NME in 2007.

Guitarist Pat Smear was dressed as Slash from Guns N’ Roses (with whom Nirvana were often feuding) and at the finale, they had a mock-fight. “Kurt had a bag of fake blood in his stomach and at the end of the duel, ‘Slash’ killed ‘Barney’ with his guitar by stabbing him. It was so funny.”

“He was really good company,” says Steve Diggle, guitarist in British punk group the Buzzcocks, who were invited by Cobain to be the opening act on what would be Nirvana’s last tour, in 1994.

“He had people following him telling him that he had to do 500 interviews, but he would say, ‘Steve, I just want to hang out with you.’ One time, he gave me a couple of wraps of cocaine. I chopped them out for everyone, but the rest of the band didn’t want any and Kurt was upstairs. So I did the lot! Then Kurt came down, he said, ‘Where’s it all gone?!’ ”

Cobain was a ball of contradictions. He was a reckless drug addict, but owned a Volvo because it was the safest car in the world. He hated the scrutiny of fame, but feared losing the monetary benefits.

He loved his daughter dearly, but ended up denying her a father. As Frances (now 22) noted in a recent interview with Rolling Stone, one of her few directions to Morgen was that she didn’t want the film to fall into the “romanticism” and “mythology” that so often surrounds her father’s memory.

“One of things that often gets played up in depictions of him is Kurt as the victim,” concludes Cross. “He was not a victim. The choices he made were his own — both in his drug abuse and suicide. Nobody forced him to do anything.”