Jamie Foxx has credited Oprah Winfrey for getting his career back on track when she noticed he was going off the rails.

The actor said that the chat show host staged an intervention when she saw his life was spiralling out of control while he was promoting the film Ray during the 2004 to 2005 awards season.

The 49-year-old actor said he was drinking heavily and doing everything "you could possibly imagine" after he received the best actor Oscar nomination for his portrayal of the legendary soul musician Ray Charles.

Jamie Foxx as music great Ray Charles

Foxx admitted he was "going hard" when he got a phone call from Winfrey.

"You're blowing it, Jamie Foxx," he said Winfrey told him. "She says, 'All this gallivanting and all this kind of sh**, that's not what you want to do'."

Oprah Winfrey

Foxx said that Winfrey staged an intervention at music producer Quincy Jones' house involving a group of actors including Sidney Poitier, who was the first African-American actor to win the best actor Academy Award back in 1964.

"We go in this house and there's all these old actors. Black actors from the 60s and the 70s. Who look like they want to say, 'Good luck'. They want to say, 'Don't blow it'," Foxx told The Howard Stern Show.

"I break down. Everyone sits me down. It was actually Sydney Poitier's birthday. They made me understand the significance of it.

"To this day, it's the most significant time in my life where it was, like, a chance to grow up."

Foxx went on to win the best actor Oscar for his performance in Ray at the 2005 Academy Awards.