The London Mayor said recreational drug use is not a "victimless crime" but instead linked to rising violence.
Mr Khan said: "We have got to make sure we take action among those young people who are involved in criminal gangs as well as those who are buying them at middle-class parties."
The mayor, answering questions on his LBC Radio phone-in show, said: "There is a definite link, which has been shown to me by the police, of drugs and criminal gangs and knife crime and crime going up.
"There are some Londoners who think it is a victimless crime, taking cocaine at 'middle-class parties'.
GETTY
CLAMPING DOWN: Sadiq Khan said recreational drug use is not a 'victimless crime'
“We have got to make sure we take action among those young people who are involved in criminal gangs as well as those who are buying them at middle-class parties”
Sadiq Khan
"We need to make sure Londoners realise there is no such thing as a victimless crime."
He added: "Some of the young people being knifed on our streets in London, some of the young people losing their lives is because they are involved in criminal gangs who are lower down the food chain in relation to drugs."
The mayor's comments came after Justice Secretary David Gauke said in May that middle-class people who take cocaine "should feel a degree of guilt and responsibility" when they see stories of teenagers being murdered in Hackney, east London.
London's 2018 crimewave victims PICTURED
A spike in violent crime in the capital sparks means London's murder rate has overtaken New York's
SWNS.com
17-year-old Katrina Makunova was fatally stabbed in Camberwell on 12 July
Mr Khan, who campaigned for a Remain vote in the EU referendum, said Brexit could make tackling the drugs trade harder.
"The drugs come from overseas and the idea that we will be more effective at fighting crime by leaving the EU – not having the security arrangements with the EU – is ridiculous," he said.
Related articles
