Shia LaBeouf's team warned him against making Honey Boy, a biopic about his life.

The Transformers actor wrote the screenplay for the drama, which chronicles his troubled relationship with his father, while he was in rehab for alcoholism and substance abuse two years ago.

The movie shows LaBeouf, who is called Otis in the movie, living in a seedy Hollywood motel with an alcoholic and drug-addicted father who mentally and physically abused him while the youngster was a child star on the Disney Channel.

While the 33-year-old found the process of making the movie therapeutic, he has now shared that his managers weren't so keen on the idea at first.

"My whole team, my whole professional team, was not with it. They were not wanting me to do this," he told Variety. "But at that point, I didn't have a whole lot to lose... I was in a wild spot in my life."

Directed by his friend Alma Har'el, Honey Boy stars A Quiet Place's Noah Jupe as the young Otis and Manchester by the Sea's Lucas Hedges as the adult Otis in rehab, while LaBeouf portrays his own father.

Accordingly, the actor admitted the role helped him "excise demons" and likened the process of making the film to an exorcism.

He has a much better relationship with his father these days, and he admitted to The Hollywood Reporter that he had already shown the project to both his parents.

"It was tough for them to watch it, yeah, but I think, also, they can have distance with it as well," he explained. "I mean they really, more than they care about this movie s**t, they care about their kid, you know? So, they're happy with my reaction to it, and they know that I wouldn't have shared it with them unless I was proud of it."