Philip Seymour Hoffman was haunted by “demons,” according to his private diaries, and desperately tried to control his addictions by attending Narcotics Anonymous meetings, according to a new report.

The Oscar-winning actor – who died of an apparent heroin overdose on Feb. 2 – also wrote about scoring drugs, and some of the entries appear to have been written while he was in rehab, NBC reported.

The scribbled diaries are hard to read, multiple sources said, with some passages starting out clearly enough but then degenerating into an illegible scrawl, suggesting he wrote them while he was wasted.

Hoffman 46, was found dead in his West Village pad apartment with a needle still stuck in his arm.

Cops found two small diaries — one about 6 by 8 inches and another about 7 by 9 inches – while searching the place.

“It’s stream of consciousness and difficult to follow,” one source told NBC.

“In one line he refers to ‘Frank who always owes money’ and on the same page he writes about a 15-year-old girl from Texas,” the source said.

“It seems he did at least part of it in rehab,” another source said. “It definitely contained some soul-searching. But there is also a fair amount of rambling that doesn’t make sense.”

Hoffman spent about 10 days in rehab in early 2013 after relapsing on prescription drugs and then heroin.

Cops also found empty packets of heroin in the Bethune Street apartment along with a stash of more than 40 full bags.

Cops also found books about Truman Capote, the writer Hoffman portrayed in his Oscar-winning role.