Rick James was crashing on Stephen Stills’ couch sometime in the late ’60s when he “awoke to see a young dude sitting on the floor in the lotus position, stoned as a motherf–ker,” with “blood dripping from his wrist. He seemed hypnotized by the flow of his own blood, saying things like, ‘Isn’t the blood beautiful? Isn’t that the deepest red you’ve ever seen?’”

James, fearing the mystery man would bleed to death, woke Stills, who responded, “Oh, f–k. He’s doing it again.”

Stills “gathered up bandages and gauze and took care of the guy, who remained passive throughout the ordeal. When he was through,” James recalled, “he said to me, ‘Ricky, meet Jim Morrison.’”

In short, Rick James lived a ­super freaky life, as detailed in his new, posthumously published autobiography, “Glow” (Atria Books).

Folk-adelic

James and his seven siblings were raised by his single mom, who ran numbers for the mob in Buffalo.

She would take young James on her collecting route, and there, at the bars she worked, he got to watch the likes of Etta James, Miles Davis and John Coltrane.

He grew up fast, losing his virginity at age 9 or 10 to a 14-year-old local girl. His “kinky nature was there early,” he wrote.

A pot smoker, heroin user and burglar by his early teens, he joined the Navy Reserve at 14 or 15 — he lied and said he was 18 — to preemptively avoid the draft, and began drumming for local jazz groups.

But between drugs, women and music, he couldn’t remember to attend his twice-monthly Reserve sessions and found himself ordered to Vietnam.

He fled to Toronto, where he became friends with hot local musicians including then-unknowns Neil Young and Joni Mitchell.

James and Mitchell developed a close friendship. “It wasn’t sexual but musical as a mother­f–ker,” he wrote. “She and I [would sit] up all night listening to Miles’ ‘Sketches of Spain.’”

James, whose real name was James Johnson, went by Ricky James Matthews to avoid military authorities.

He formed a band called the Mynah Birds and, seeking to take them in a folk-rock direction, reached out to Young, who was staying at Mitchell’s apartment.

“Neil was cool. He had a quirky sense of humor and a quick mind,” James wrote. “His singing was a little strange, but his facility on the guitar was crazy.”

The Mynah Birds were signed to Motown Records and, while in the label’s home city of Detroit, James met Stevie Wonder, then 16 and already a star. James nervously sang Wonder’s “Fingertips” for him. Wonder loved it and asked James his name.

“Ricky James Matthews,” he replied.

“That’s too long,” said Wonder. “Ricky James sounds more like it.”

Pimpin’ ain’t easy

Back in Canada, James had a dispute with a financial backer that ended with him beating the man — stupid, because that man was the only person in Toronto who knew James was AWOL and he ratted him out.

The band lost its deal. James turned himself in and spent a year in jail.

Afterward, James took off to Los Angeles to reconnect with his since-relocated Toronto crew. But he was crushed when, after forming a promising duo with a musician named Greg Reeves, Reeves was invited to join Crosby, Stills, Nash & Young instead of him.

Stills and Graham Nash, understanding the sensitivity of the situation, had asked James’ permission first, which he granted, and Stills tossed him a vial of pharmaceutical cocaine for his trouble.

James was eventually hired as a staff writer for Motown, soon learning that certain personnel had a seedy way of earning extra money.

Jimmy Ruffin was a Motown artist who had a hit with “What Becomes of the Brokenhearted.” Ruffin and James, as James told it, both had girlfriends who wanted to “bring” them money.

“So many of the big-name men at Motown had worked as pimps,” James wrote, “that it was practically the norm.”

The two brought their girlfriends to Toronto to have them “work the clubs,” and James’ stable expanded to three or four women. But James felt he wasn’t ruthless enough for the gig.

“I lacked the hard-edged discipline and cold-blooded attitude a good pimp requires,” he wrote. “If my bitch said she was too tired to work, I said go home. If she said some john had beat her, I’d find the john and beat his ass. Pimping was too inhuman for me. I let the girls go and went back to my music.”

He returned to LA with Jay Sebring, “a cat who’d made millions selling hair products,” who agreed to invest in James’ music.

One night, Sebring invited James and his girlfriend, Seville, to a party he was attending at Roman Polanski’s house, which was being thrown by the director’s wife, Sharon Tate.

“There was gonna be a big party,” James wrote, “and Jay didn’t want us to miss it.”

Unfortunately — or so he thought at the time — James was nursing a horrible hangover that left him barely mobile.

The hangover saved James’ and Seville’s lives, as Sebring, Tate and the other guests were brutally murdered that night by Charles Manson’s clan.

Freaky fall

After his song “My Mama” hit it big in Europe, James toured clubs there. He met a tall, 19-year-old Swedish girl and found her to be “freedom herself.”

But James’ notions of freedom were tested when “her mother walked in her room and joined us in bed. This was my real ­introduction to fully realized freakery.”

In 1978, James released what became his first Top 20 hit, “You and I,” off his “Come Get It!” album for Motown.

The album took off, as did the next, and soon James received a royalty check for almost $2 million and bought a mansion once owned by William Randolph Hearst.

His 1981 release “Street Songs” took him to another level, as it featured the hits “Give It To Me Baby” — which concerned his difficulties having sex when he was on cocaine — and “Super Freak.”

As he wrote the latter hit, James thought it sounded “cheesy” and “a little dumb” and almost scrapped it, but his band members convinced him otherwise.

The song spent 10 weeks in the Top 40 and has been widely covered and sampled ever since.

But just as he reached the heights to which he had long aspired, James discovered the wonder of freebasing cocaine.

“When I hit it that first time, sirens went off. Rockets were launched. I was sent reeling through space,” he wrote. “At the time, the physical exhilaration of smoking coke in pure form overpowered any semblance of sense I ever possessed.”

His life became an odd mix of superstar thrills and bottoming out. He spent Christmas with Diana Ross, began an affair with Princess Elizabeth of Yugoslavia and produced a hit for Eddie Murphy called “Party All the Time.”

He accused Prince of ripping off his act and got revenge by grabbing him by his hair and pouring cognac down his throat until “he started crying like a baby. I laughed.”

He was also putting aluminum foil over the windows to keep out all the light.

James reached out to Ray Charles, who had a long history of addiction, for advice on how to stay clean. But Charles had nothing to offer, admitting, “I cut all my big hits when I was high.”

James also discovered that Charles was drinking a large mug full of coffee and gin every 90 minutes.

His album sales tapered off, and James alternated between rehab stints and drug binges. His star and his life were fading fast.

“I still got invited to high-profile parties and the occasional orgy,” he wrote, “but the invitations weren’t what they used to be. My power was definitely on the decline.”

‘Lowest level of hell’

He wound up with a financial windfall after suing MC Hammer for using “Super Freak” as the basis for his massive hit, “U Can’t Touch This,” but fell further than ever when his beloved mother died of cancer.

“With Mom gone, there was nothing to keep me from descending into the lowest level of hell,” he wrote. “That meant orgies. That meant sadomasochism. That even meant bestiality. I was the Roman emperor Caligula. I was the Marquis de Sade.”

James had sex with strange women on the floors of crack dens, and he and a girlfriend named Tanya were arrested for beating two different women in separate incidents. One of the women accused James of keeping her as a sex slave.

Tanya served two years in prison, James a bit longer, and they married upon release.

James’ final album, 1997’s ­“Urban Rapsody,” stalled at No. 170 on the Billboard charts. James’ final years saw no real accomplishments.

He suffered a minor stroke in 1998 and died on Aug. 6, 2004, at age 56, with “nine drugs in his body, including cocaine, Valium, Vicodin and methamphetamine.”

During his funeral, writes journalist David Ritz, who helped with the autobiography, “a giant joint was placed atop one of the speakers facing the mourners. Someone lit it. The smell of weed began drifting over the hall. A few turned their heads to avoid the smoke; others opened their mouths and inhaled.”

Rick James’ insane life

As his autobiography, “Glow,” proves, Rick James was a Forrest Gump of popular music.

1964: Helps found an R&B-and-folk band, the Mynah Birds, which eventually includes Neil Young.

1966: Gets his stage name from Stevie Wonder.

Late 1960s: Wakes in Stephen Stills’ apartment to find a bleeding Jim Morrison seated before him.

1969: Misses out on a chance to be in Crosby, Stills, Nash & Young — is given cocaine instead.

Aug. 8, 1969: Because of a hangover, skips a party at Sharon Tate’s house — and avoids being killed by Charles Manson’s followers.

1980: At a dinner party, a guest asks to sketch him on a napkin. It’s Salvador Dalí. James forgets the napkin is in his pocket, goes swimming, and ruins it.

1981: His biggest hits, “Give It to Me Baby” and “Super Freak,” are released. He accuses opening act Prince of ripping off his moves.

1982: Linda Blair of “The Exorcist” calls him “the sexiest man in the world” in an interview. James calls her up, offers to prove it; they have a passionate affair.

1985: Writes and produces a hit single for comedian Eddie Murphy, “Party All the Time.”

1990: “U Can’t Touch This” by MC Hammer uses “Super Freak” as its core, earning James millions in royalties.

2004: Comedian Dave Chappelle makes him famous again, featuring stories of his ’80s antics and the catchphrase, “I’m Rick James, bitch!”