CeeLo Green pleaded no contest Friday, Aug. 29, to giving a woman ecstasy in 2012.

The 39-year-old former "The Voice" coach, whose real name is Thomas DeCarlo Callaway, was charged last year by the Los Angeles County District Attorney's Office with one count of furnishing a controlled substance, Reuters reported.

Green took the no-jail deal under a type of plea that let him to refuse wrongdoing, according to New York Daily News. "I plead no contest where I maintain my innocence," said the "Forget You" hitmaker  in Los Angeles County Superior Court.

Superior Court Judge Mark Young sentenced the Grammy-winning recording artist to three years of formal probation and ordered him to complete 52 Alcoholics Anonymous or Narcotics Anonymous meetings as well as 360 hours of community service, which he can serve through MusiCares Foundation, an affiliate of the organization that presents the Grammy Awards, the Associated Press reported.

But Green will be allowed to travel for work and see a private doctor for drug and alcohol counseling, according to the judge.

"CeeLo Green is pleased that the District Attorney's office would allow him the opportunity to resolve this appropriately and maintain his innocence. He is happy to put this behind him and continue to move forward," Anne Watkins, a spokeswoman for Green, said in a statement.

Green will return to court March next year for a progress report.

According to prosecutors last year, Green "slipped" ecstasy to a 33-year-old woman while they were dining at a sushi restaurant in July 2012. But the singer-songwriter pleaded not guilty to a felony charge of giving ecstasy to the woman without her knowledge.

The woman had initially filed a police report accusing Green of sexual assault, but prosecutors said there was no enough evidence to charge the singer with rape of an intoxicated person, so the felony sexual assault charge was rejected.

Green's lawyer Blair Berk previously described any physical contact between the woman and his client as "consensual," New York Daily News reported.

Green, who was one of the four original coaches on NBC's reality singing competition "The Voice," exited the show after he was charged, NBC News reported.

"NBC and I plan to continue our relationship with several new co-ventures including a new music show, while we also explore our ideas for me to create and host a new show of my own. I will not go quietly into the night," he said in a February statement.

"The Voice" Season 7 is slated to begin on Sept. 22 on NBC, with returning coaches Blake Shelton and Adam Levine as well as first-time coaches Gwen Stefani and Pharrell Williams