Former teacher Guz Khan is recalling the time he legged it out of an A-level class. He had organised an interview about his fictional character Mobeen, after the two comedy videos he’d posted online had caught the eye of his local news programme in the West Midlands.

“I asked the teacher in the next classroom: ‘Yo, listen, you’ve got to hold it down, make sure this lot don’t beat each other up,’’’ he says. “I ran out to do the interview. At that point I’d done a couple of Mobeen videos but I wasn’t a YouTuber by any means because I was a teacher. I was marking books, feeding the family – that was real life.”

Those early videos eventually led to Man Like Mobeen, the BBC Three comedy he created and stars in, set in Small Heath, Birmingham. Mobeen, a bearded Muslim man, attempts to live a good life and single-handedly look after his younger sister, Aks (Dúaa Karim), all while trying to escape his criminal past and avoid being landed in more trouble by his mates Eight (Tez Ilyas) and Nate (Tolu Ogunmefun).

Today, wearing oversized, yellow-framed glasses that would make Deirdre Barlow jealous, Khan marvels at how quickly those two videos led to two series of Man Like Mobeen (he’s about to embark on a third). There’s also a starring role alongside Idris Elba in Netflix’s Turn Up Charlie, in which Elba plays a washed-up, one-hit-wonder DJ and Khan plays his loafer mate Del, plus a part in a new Hulu series and a standup tour.

As a child, Khan says that he never saw someone like him on telly. “It wasn’t just about race; I never saw anybody on TV who was working class,” he says. “To make it, you had to be posh, and acting is posh, isn’t it?”

Despite spending his youth in the ethnically mixed, working-class suburb of Hillfields in Coventry, it wasn’t much different at his school. “There were only six or seven non-white kids there,” he says. “There was this one white kid whose birthday party it was. He came out to the playground with a Kwik Save bag and started pulling out invites. Everyone got one except for me. He goes: ‘I wanted to invite you but my dad said he doesn’t want any Pakis at the party.’ And I was like: ‘Oh shit … I’m different.’ That’s the first time it ever struck me as being an issue.”

When he told the story to his family, they had pretty strong advice: “‘You have to stand up for yourself if somebody is going to violate you racially,’ they told me. I was always so grateful for that mentality because if I’d have just thought that accepting that kind of racial discrimination was part of life, it might have made me feel like less of a person; that there’s something wrong with my skin.”

He is open about some of the other challenges he faced as he got older. “I was never on the more violent end of the spectrum, but could I have gone down the wrong path? Hundred per cent,” he says. “I often reflect on friends who did and who are still currently facing different levels of criminal charges. That’s our life, this is our reality.”

Being at the helm of a classroom also formed his views on what he sees as a breakdown of community. “We may not have had money, but there was a community feeling – if you didn’t see your mum for a couple of hours some auntie would check in on you, whether it was one from a south Asian family, a Caribbean or a white, working-class, Irish family. Somebody would be there for you,” he explains. “We generally never saw the levels of abuse and violence and temptation that this current generation sees, despite struggling financially.”

We talk about the disconnect between families and the ills of children spending time on tablets and phones, and he confesses that, as a parent himself, he juggles the usefulness of distracting a child for a few minutes with an iPad while also trying to explain that life online isn’t real.

He laughs when I ask him about his own social-media use and his comments on British Asian politicians (he tweeted a picture of Sajid Javid and wrote: “This sellout may have come from hardworking Pakistani immigrant parents, but he left all of that behind long ago … You aren’t supported by the working class, and you aren’t welcome in the hood”). “Politicians are constantly telling their colleagues: ‘I’m just like you,’” he says, “but when it comes to the people they’re supposed to represent, they are so dismissive of them. The whole ‘I am the son of a bus driver’ thing is so tokenistic.”

Has he thought of going into politics himself? “A hundred per cent. As a child of immigrants I can’t help but be politicised, I can’t avoid it.” I ask whether he feels a duty to represent Asian and Muslim people. “There is so much negative pressure on [Muslims] in society, we have to be the responsible voice,” he says, “because with what happened in Christchurch, we do have an obligation.”

Man Like Mobeen. Photograph: BBC

The talk moves on to what he thinks about other Asian sitcoms and he sighs as he talks about Citizen Khan, the BBC One comedy about a Muslim community leader that ran to five series.

“[Citizen Khan] plays on stereotypes, so when an audience watches it they expect to see that old uncle-ji [respectable term for a male elder] in real life.” He affects an Indian head wobble. “It’s a fundamental issue of it not going to be representative of the people it’s supposed to be about.”

He tells me about watching an old episode of Only Fools and Horses that features a visit to a doctor and how it reinforces old stereotypes about immigrants, with a line from Del Boy about getting a council house that goes: “Well, good luck with that doctor. If you spoke a foreign language and popped nine kids out you’d have a chance!”

“I’m watching it thinking that those same frames of reference are still being used now: ‘They get fucking benefits, they have 12 kids, they get the houses before us … ’ It was in Only Fools, one of my favourite British comedies of all time and it’s still here now,” he says. “Those frames of reference push people to the margin.”

The link between Khan’s comedy and his desire to shift those parameters are obvious when you watch Man Like Mobeen, but he also isn’t afraid of portraying negative pictures from within his own community.

“My faith tells me that all you’re really asked to do in this life is be truthful – it’s one of the strongest elements of piety,” he says. “If in my storywriting I’m telling the truth of what it’s like for young men in Birmingham who go to jummah salah [Friday prayers] but are selling heroin throughout the week, well, you might get upset because you don’t want me to bring that kind of heat on the community. But why should I be worried about what people think if it’s the truth?”

We turn our focus to other barriers to good representation of minorities.

“Wait, who is the old dude who married his assistant?”

Paul Daniels?

“Yes, that’s him! Why do I know more about his life than someone like Idris Elba? Idris has an amazing life story: he came from one of the hardest council blocks in London and worked 20 years in the industry before things really started working for him – why didn’t we know about that story? Because nobody thought it important enough that a talented, working-class, black man from an immigrant family in this country was an important story to tell.”

Listing off his work – a third series of Man Like Mobeen to write; starring in Turn Up Charlie with Idris Elba; embarking on Persons of Interest, a standup tour with fellow comedian Mo Amer; and finishing up his role in Mindy Kaling’s Four Weddings and a Funeral miniseries for Hulu – life must feel pretty sweet right now?

“Can you believe this face is gonna be part of a Hollywood production on Hulu?” He shakes his head as he wipes his glasses. “This coming September, it will only be four years since I left teaching,” he says. “For some people this is going to sound lame, but I believe that everything I went through – from not being invited to that party as six-year-old to now – were little building blocks that have led to this guy who’s able to make social commentary from comedy.”

He seems acutely aware of the pitfalls of fast success. “Look, if it all disappears for me tomorrow I won’t really care. The main thing for me is: are people at home healthy and happy? Are my kids and my nieces and nephews doing their best to be good people? That’s the real win.”

He insists that he doesn’t see himself being in front of the camera for that long, that he’d rather focus on supporting the next generation of authentic working-class voices to make it. Guz Khan, it seems, wants to invite everyone to his party.

Series one and two of Man Like Mobeen are available on BBC iPlayer. Mo Amer & Guz Khan: Persons of Interest is touring to 13 April