The members of the 1011 group received criminal behaviour orders (CBOs) on Friday that will also force them to warn police before they record or perform songs for three years.
The Metropolitan Police is cracking down on drill videos because they glamourise violent crime.
The term drill is slang for automatic weapons, and drill videos typically feature masked gangs talking about guns, drugs and violence.
Scotland Yard blamed the sub-genre of rap or an increase in violence in the capital.
But the drill musicians themselves, along with their fans, argue they are just portraying the realities of their lives.
Judge Ann Mulligan, sitting at Kingston Crown Court, made the CBOs against Yonas Girma, 21, Micah Bedeau, 19, Isaac Marshall, 18, Jordan Bedeau, 17, and Rhys Herbert, 17, after they were locked up for conspiracy to commit violent disorder.
But a legal director at Open Rights Group, an organisation that defends digital rights and freedoms, has slammed the ruling, saying it is “extraordinarily concerning”.
Myles Jackman said: “There has been restrictions put in place on language on the basis that it may incite further criminality – we are getting into the territory of thought crime.”
The head of Index on Censorship, a publishing organisation for freedom of expression, said violence needs to be tackled, “not ideas and opinions”.
Chief executive Jodie Ginsberg said: “This isn’t going to address the issues that lead to the creation of this kind of music, nor should we be creating a precedent in which certain forms of art which include violent images or ideas are banned,” she added.
The Metropolitan Police warned the orders would be increasingly sought and the head of anti-gang unit Trident defended them as necessary for music that inflames violence.
Detective chief superintendent Kevin Southworth said: “We’re not in the business of killing anyone’s fun, we’re not in the business of killing anyone’s artistic expression – we are in the business of stopping people being killed.
“This isn’t about us straying into the area of regulation or censorship.”
Last month, YouTube removed more than half of the music videos the Met asked to be deleted because they promote violence.
Girma, of Hanworth; Marshall, of Ladbroke Grove; Herbert, and brothers Jordan and Micah Bedeau, of Notting Hill, are serving jail or detention sentences for between 10 months and three-and-a-half years.
There has been a sharp rise in violent deaths in London, including several stabbings, in 2018.