Judge James Brandlin said Brown, who was arrested on Friday, was kicked out of his rehab program in Malibu after touching a female and failing to take a drug test.
Brown also made a threat during a morning reflection session, allegedly telling the group, "I am good at using guns and knives," Brandlin said.
The singer has been in jail since Friday, when he was arrested after arriving at the rehab center in Malibu.
All efforts by his defence attorney to secure a bail for him were unsuccessful. The presiding judge insisted that Chris Brown put himself in his current situation by repeatedly going against court instructions.
His legal troubles started in 2009 after his famous beating of Ex-girlfriend Rihanna.