(Sylvester Stewart aka: Sly Stone)

*The legendary Sly Stone is in trouble with the law and is slated to appear in an L.A. courtroom later today.  It seems that Stone was arrested for cocaine possession back in April, according to TMZ.

Stone — real name Sylvester Stewart — was arrested on April 1 … after LAPD officers say they found freebase cocaine on the 68-year-old during a vehicle search.

TMZ spoke with Sly’s attorney, James Silverstein, who tells us Stone was riding in a buddy’s camper vehicle with some friends  … when it was pulled over for a routine traffic violation (driving while being black?).

During the stop, Silverstein says, cops searched the vehicle and found the coke.

Stone was arrested and hauled to a nearby police station.

Developing …