After a daylong hearing, Judge Louis Hanoian threw out all charges against rapper Brandon Duncan and co-defendant Aaron Harvey.
The charges stemmed from nine shootings in San Diego between May 2013 and February 2014.
Hanoian ruled that several other co-defendants must stand trial in the case.
Prosecutors alleged Duncan rapped about gang violence, which benefited a gang.
Duncan, also known as Tiny Doo, said the case will not prevent him from writing his music.
"If you want to hear my music, you want to listen to it ... it's not promoting anything,'' Duncan said outside court."I'm not telling nobody to commit no crime, I'm not telling nobody to do anything. It's just artistry.''
Superior Court Judge David Gill recently dismissed charges against some of the defendants, saying prosecutors didn't present enough evidence to prove that those defendants willfully benefited from the violent crimes alleged. Other defendants, who were split into a different group -- were bound over for trial.
Hanoian today granted a defense motion to dismiss charges against Duncan and Harvey, ruling that the defendants could not face a conspiracy charge without a specific crime attached to it.
District Attorney Bonnie Dumanis said in December that case was not about punishing someone for rapping, but rather "protecting our neighborhoods by taking violent gang members off the streets and holding them accountable for the crimes they commit using a law that the voters passed and the court recognized as constitutional.''
- Community rallies for men in gang conspiracy case
- DA: Album promoting shootings lands rapper in jail