Shia LaBeouf is in a period of self-discovery.

The former child star -- who has had his fair share of trials and tribulations throughout the years -- recently opened up about how his arrest in 2017 helped shape his path toward self-reform and aided him in writing his upcoming movie “Honey Boy.”

The autobiographical screenplay, which is set for release in select theatres on Friday, follows the life of LaBeouf when he was a young Disney Channel star.

The “Even Stevens” alum recalled being at his absolute lowest point after he was arrested in Savannah, Ga. and charged with public drunkenness, disorderly conduct and obstruction after the “Peanut Butter Falcon” actor asked a stranger for a cigarette but was denied.

Oct. 9, 2015: Actor Shia LaBeouf was arrested by the Austin Police Department for public intoxication.

Oct. 9, 2015: Actor Shia LaBeouf was arrested by the Austin Police Department for public intoxication. (Austin Police Department)

LaBeouf, 33, was ordered to a court-mandated treatment facility following the incident.

"I thought the actor thing was over. I signed up to go to the Peace Corps," LaBeouf revealed Wednesday on “Jimmy Kimmel Live!” “And then I went into this rehab facility, was there for two months, had written this thing, plans changed, so when I got out, I wasn't going to do the Peace Corps no more."

SHIA LABEOUF'S DRUNKEN ARREST MELTDOWN: 'I'VE GOT MORE MILLIONAIRE LAWYERS THAN YOU KNOW WHAT TO DO WITH YOU STUPID B--'

The actor said he spoke with the organization when he decided to drop out and explained that they actually took the news in stride.

“We had a little conversation about it. They were very peaceful about it,” said LaBeouf. “Very calm, 'Listen I'm not going to come...' 'That's OK!' It's not like the Navy or something like that. It's not the Marine Corps."

LaBeouf praised the police officer who arrested him in Georgia while accepting the Breakthrough Screenwriter Award for his film at the Hollywood Film Awards in Los Angeles on Sunday.

SHIA LABEOUF APOLOGIZES FOLLOWING RACIAL RANT DIRECTED AT POLICE OFFICER

"I want to thank the police officer who arrested me in Georgia, for changing my life," LaBeouf said, according to USA Today. Some in the crowd apparently laughed at LaBeouf's remarks, seemingly not knowing if the "Transformers" star was kidding.

When Robert Downey Jr. presented LaBeouf his award over the weekend, he praised the screenplay, describing it as "damn near perfect. He added it was "easily the best and bravest film I have seen in years."

SHIA LABEOUF ARRESTED OUTSIDE NEW YORK MUSEUM

LaBeouf also thanked his therapist and sponsor "for saving my life" and his parents "for giving my life."

In this Saturday, July 8, 2017 photo released by the Chatham County Sheriff's Office, actor Shia LaBeouf poses for a booking photo, in Savannah, Ga. LaBeouf has been released from a Georgia jail after posting $7,000 bond on charges of public drunkenness. In addition to the public drunkenness charge, he also was arrested for disorderly conduct and obstruction. Further details surrounding the arrest were not immediately available. (Chatham County Sheriff's Office via AP)

Shia LaBeouf was arrested in Savannah, Ga., in 2017 for disorderly conduct. On Sunday, he thanked the police officer who arrested him "for changing my life." (Chatham County Sheriff's Office via AP)

Fox News’ Nicole Darrah contributed to this report.