Terry Crews was a porn addict, but good news — he's long past his "dirty little secret."

The "Brooklyn Nine-Nine" actor took to Facebook to reveal that he was addicted to pornography "for years," an addiction that threatened his relationship with his wife.

Categorizing pornography addiction as a "worldwide problem" that "really messed up my life in a lot of ways," the actor said, "It became a thing where I didn't tell anybody … and that allowed it to grow."

Also Read: Porn Actress Fires Back at Ted Cruz for Pulling Campaign Ad: 'I Would Say It's a Tad Bit Hypocritical' (Video)

"It got bad," the actor added. "If day turns into night and you are still watching, you've probably got a problem, and that was me."

Crews revealed that he reached a turning point when his wife told him, "I don't know you anymore. I'm out of here."

"I literally had to go to rehab for it," Crews continued, in a post titled "Dirty Little Secret." "What I found is that, by not telling people, it becomes more powerful."

Also Read: Josh Duggar Rough-Sex Lawsuit Dismissed as Porn Star Admits Lying

While Crews said he's been free of pornography addiction for six or seven years, he noted that "it's become my battle to help other people who are going through the same thing."

"There are a lot of people who can't stop, and I'm here to help you," Crews said.

The actor suggested that pornography addiction "changes the way you think about people … I had to change my thinking, I had to change what I believed."

Also Read: Miss Colombia Gets $1 Million Porn Offer From Vivid

"Once I was aware of what it was doing to me, it changed me," Crews added.

Watch Crews speak about porn addiction in the video.