The move was prompted after an advert for Starburst sweets was put at the start of a video by group Moscow17.
The confectionery company said it was “unacceptable” to see its brand alongside that type of content.
A report from the Sun said the advertising was worth around £5m to the video sharing website – but the company would not confirm this, saying it did not plan to provide any detail on its advertising budget.
The video featuring Mr Kamara, who was 23 when he was stabbed in Camberwell on Wednesday, sees the group rapping about being “at war” with the police.
The Sun says that the music video uploaded on to YouTube for the group’s track GB x Knockoutned – City of God was at one stage preceded by an advert for the sweets.
The video, which has been viewed 40,000 times, is still on the website, but no advert now appears ahead of it.
Two men are in custody on suspicion of the murder of Mr Kamara. The Metropolitan Police said “one line of inquiry is this being gang-related”.
Earlier this year, Mr Kamara was cleared at the Old Bailey of murdering 17-year-old Abdirahman Mohamed.
A spokeswoman for Mars said: “It is unacceptable and disappointing to see one of our brands advertised alongside this video content.
“This clearly breaches our brand safety guidelines and Mars adverts should never run alongside such content.
“We have taken the action to remove all our online advertising on YouTube and can confirm we are working with Google and our media buying agencies to understand what went wrong.
“Until we have confidence that appropriate safeguards are in place, we will not advertise on YouTube.”
Drill music has been linked to violence in the capital by Metropolitan Police Commissioner Cressida Dick.
The music often sees rappers talking about violence and using gang-related symbols, such as wearing balaclavas. It has also been used to fuel rivalries between gangs.
YouTube has deleted around 30 videos at the request of Ms Dick, which she says glamorised violence.
A spokesman from YouTube told the Sun: “We share the deep concern on this issue and don’t want our platform used to incite violence.”