“I always found myself playing the part of terrorist number two, [with] just one line: ‘Allahu Akbar’.” The YouTube star Humza Arshad shouts the last two words with such force that pupils at Harris Academy jump, before roaring with laughter.

It might seem an unlikely joke to make at a school workshop tackling violent crime and extremism, but that is precisely why Arshad is here: to break down the barriers that can prevent the message getting across.

The actor-comedian’s YouTube series Badman and the earlier Diary of a Bad Man have won him a huge youth following: he has had more than 100m views. For the past two weeks, with Metropolitan police counter-terrorism officers, he has visited 16 schools in eight London boroughs particularly affected by violent crime.

At the final workshop, at Harris Academy in Peckham, he has the children – aged 11 to 15 – eating out of his hands with his jokes before moving on to more serious issues.

“I’m from south London, so I know how dangerous it can be outside,” the Streatham-born comedian, clad in woolly hat and big hooded coat, tells the audience of more than 200 children. He shares the story about how his friend Ché Morrison was stabbed to death last year in Ilford, east London. The silence is punctuated by the odd gasp as he tells them how the killers filmed his friend as he lay dying, and he ended up seeing the footage of Morrison’s last breaths.

Arshad admits to being a “very different person” before he became a comedian. “I don’t like telling this story when the police are here,” he says, to laughs, before recalling a story about an aborted revenge attack in his youth.

Facebook Twitter Pinterest Humza Arshad, whose YouTube series Diary of a Bad Man and Badman satirise British Asian culture, addresses schoolchildren at Harris Academy, Peckham, south London. Photograph: Martin Godwin/The Guardian

The comedian says he was moved to speak to schoolchildren by Morrison’s death, the New Zealand mosque attack, and increasing intolerance since the Brexit vote. He has also co-directed and acts in a short 12-minute film, Hate, shown at all the schools he has visited and launching on his YouTube channel on Monday.

The film does not pull punches, depicting the cyclical nature of hate, and taking in gang violence, stabbings, shootings, acid attacks and extremism. It also addresses frustrations young people feel with the police, with Arshad’s character bemoaning the fact his wife’s attacker would probably have been caught “if his skin was darker”.

Two counter-terrorism officers present at the Peckham workshop discuss some of the issues raised by the film, as well as the use of fake news to spread extremism, tactics used by gangs to coerce young people, and homophobia. There is palpable shock among the Harris Academy pupils when they pull up a photograph on the big screen of a smiling “normal” 17-year-old, before revealing him to be Salman Abedi, who, five years later, detonated an explosive vest at an Ariane Grande concert in Manchester.

Facebook Twitter Pinterest Arshad’s workshop met with laughter at Harris Academy, where pupils praised his approach to the serious topics addressed. Photograph: Martin Godwin/The Guardian

Afterwards, pupils were full of praise for the workshop, and for Arshad in particular. Farhan Khan, 14, said the issues raised were pertinent given that an ex-student of the academy, Malcolm Mide-Madariola, was stabbed to death aged 17 in 2018. Khan said of Arshad: “He came out of this culture so it’s more of a personal story. I’d rather have someone being jokey about it rather than just serious. It was really good, really inspiring, the film was great, it gave a good message.”

Fabiola Banora, 14, who said that her brother was stabbed when riding his bike, praised the film for examining why people are getting into crime, saying it was “a conversation that isn’t going on in our communities”. She added: “We have respect for what the police do but seeing someone [like Arshad] that comes from that [same background], looks like us, dealing with the same issues, saying we can live better, as people from disadvantaged communities, you couldn’t relate to a police officer [saying that].”

Arshad acknowledged the logic. “It’s easy for me to come in being the cool one and making them laugh, breaking the barriers with comedy and then once they engage, without being preachy, being able to teach or inform,” he said.

“The police are aware of the perception they tend to have in the wider community but the police are teaming up with me to try to change that.”