The actor, who won his first Oscar for the 1979 film, said he based much of his role on his failing relationship with his first wife Anne Byrne and also had a hand in re-writing the script to reflect his own experiences.
He told GQ: “I expected it to be a painful experience and I realised it was the opposite.
“It was liberating. If you’re a writer, you get up in the morning and you write what’s coming out of you.
“But an actor is working off someone else’s creation. With this, I felt like the author of it.”
Hoffman also revealed he almost lost the role that won him his second best actor Oscar when he asked Rain Man director Barry Levinson to give his part playing Tom Cruise’s autistic brother to Richard Dreyfuss after filming had begun.
The 75-year-old Hoffman recently made his directorial debut with Quartet, a comedy about four elderly opera singers who are reunited in a specialist retirement home.