Oscar-winner Philip Seymour Hoffman had been kicked out of his apartment by his longtime girlfriend because of his raging heroin addiction, pals told The Post on Monday.

“It was known that he was struggling to stay sober, and [girlfriend Mimi O’Donnell] had given him some tough love and told him he needed some time away from the kids and to get straight again,” a Hollywood source said.

The troubled screen and stage star began renting a tony $9,800-a-month pad on Bethune Street in Greenwich Village — fewer than three blocks from the home he’d shared with O’Donnell and their three young kids — around three months ago, neighbors said.

“He was apparently in the throes of a major heroin addiction’’ when he died, a law-enforcement source said, adding that there didn’t appear to be another woman in the actor’s life.

“Sex is the last thing on your mind’’ when you’re so drug-addicted, the source said. “Your sex is your drugs.”

Hoffman, a 46-year-old upstate New York native, was discovered in his underwear lying on his right side on the bathroom floor — with a hypodermic needle still stuck in his left forearm, sources said.

Famed for his Oscar-winning turn as Truman Capote and a slew of other movies from “Boogie Nights’’ to “Owning Mahony’’ to “The Hunger Games: Catching Fire,’’ Hoffman was found by playwright pal David Bar Katz and the actor’s British personal assistant, Isabella “Bella’’ Wing-Davey, sources said.

Cops found five empty glassine envelopes in a garbage can in the pad, two more under the bed and one on a table, along with a charred spoon in the kitchen sink, sources said.

They also found 70 baggies of heroin in a desk drawer and bags of unused needles in the living room, sources said.

Some of the drug baggies were marked “Ace of Spades,” which sources said is a potent brand of heroin that has not been seen on city streets since around 2008 in Brooklyn. Others were labeled “Ace of Hearts,” and one had a playing-card jack stamped on it.

The versatile actor — known for his vivid portrayals of troubled souls — had repeatedly struggled with substance abuse. He spent 10 days in rehab last year for abusing prescription pills and heroin after 23 years of sobriety.

Hoffman, described by friends and neighbors as a devoted family man, was supposed to show up at his family’s Jane Street address at 9 a.m. Sunday to take the kids for a visit, sources said.

O’Donnell, a costume designer who had been with Hoffman for 14 years, got worried when he didn’t surface and started calling around, sources said. Katz and Wing-Davey went to the apartment and made the tragic discovery.

Both Katz and Wing-Davey told cops they didn’t know how often Hoffman used drugs or where he got them from, sources said.

Sources said O’Donnell last saw Hoffman on the street Saturday afternoon, and the pair spoke again by phone around 10 p.m. She told police he sounded like he was high on the phone, sources said.

They have a son, Cooper, 10, and two daughters, Tallulah, 7, and Willa, 5.

But his personal problems had to have been weighing on his mind, sources said.

“They were living separate lives,’’ a law-enforcement source said of Hoffman and O’Donnell, who met in 1999 while working on the play “In Arabia We’d All Be Kings,” which Hoffman directed.

“He was living over here, she was living over there. You do the math.’’

A Jane Street neighbor described Hoffman as “a troubled soul,” adding that “everyone knew he had substance-abuse problems.”

“He did not look well recently — like he was out of it,” the woman said.

Another neighbor, Amy Gruenhut, 33, said she last saw Hoffman about two weeks ago.

“I would see him strolling around looking depressed.

“He looked sad. He didn’t look normal. There was something off. He just looked really sad and lonely.”

A native of Fairport, Hoffman was a trained stage actor who scored his breakthrough movie role in 1997’s “Boogie Nights,” in which he played a gay member of a porn film crew.

He won the Academy Award for Best Actor for his portrayal of Truman Capote in the 2005 movie, shortly after publicly admitting that he had nearly succumbed to substance abuse years earlier, after graduating from NYU’s drama school.

“It was all that [drugs and alcohol], yeah. It was anything I could get my hands on . . . I liked it all,” he told “60 Minutes” at the time.

But he said he got sober in rehab.

Then last year, he admitted to suffering a drug relapse in 2012, and again went to rehab.

Also in 2012, he was nominated for a Tony Award for his portrayal of Willy Loman in a revival of “Death of a Salesman,” one of three times he was up for Broadway’s highest honor.

He also had been nominated for Oscars for his appearances in “Doubt,” “Charlie Wilson’s War” and “The Master,” in which he played a character inspired by L. Ron Hubbard, the founder of Scientology.

In a statement released by his manager, Hoffman’s family called his death “a tragic and sudden loss.”

“We are devastated by the loss of our beloved Phil and appreciate the outpouring of love and support we have received from everyone,” the statement said.