Chris Brown tested positive for marijuana.
The R&B superstar is on probation for assaulting his ex-girlfriend Rihanna in 2009.
Chris took a drug test in Virginia recently and cannabis was found in his system.
Chris can legally smoke the drug in California as he has been issued a medical marijuana card.
Still, Radar Online reports that Los Angeles Superior Court Judge Patricia Schnegg is not happy with the disclosure.
"Young people look up to you, you can't be acting like this," she said in court.
Judge Schnegg has not yet decided whether or not to find Chris in violation of his probation and has scheduled a hearing on November 1 to discuss the matter further.
Chris has been doing community service in his native state of Virginia.
Since there have been numerous discrepancies about how much work Chris has actually completed in Virginia and officials in the state say that he has violated travel restriction terms, Judge Schnegg has ordered Chris to complete community service in California.
Chris must report to his probation officer within 72 hours.
Rihanna sent him a supportive note on Twitter before the hearing.
"I'm praying for you and wishing u the best today!" she tweeted.