In 2012, the comedian Mawaan Rizwan was making videos for YouTube and gaining modest success. One day, he found himself in need of a stooge for his latest sketch, so he roped in his mum, Shahnaz.

The resulting video, My Mum Hates Me, in which the two of them banter back and forth about all the ways in which they annoy each other, took off in a way he’d never experienced. “That got 115,078 views,” he says. “So we did loads more sketches. In one of them, she dressed up as a goth, in another she was a midwife.”

His mother proved to be Mawaan’s secret weapon: in his first year on YouTube, working alone, he had managed a million views in total; by 2013, with his mother alongside him, he was getting 6.1m.

Then, almost exactly a year after he’d first put Shahnaz in front of the camera, Bollywood came calling. Mawaan was thrilled; still in his early 20s, he was convinced his big break had arrived. “I thought, ‘Here we go! Fame is around the corner. When do you want to meet me? And they said, ‘Oh, it’s not you we want. The person we’re interested in casting is your mother.’”

“I thought, ‘There’s no way mum will be interested in a career in Bollywood.’ But when I mentioned it to her she said, ‘Why not?’”

Five years on, Shahnaz is one of the most recognised faces in Asia after starring in a TV series called Yeh Hai Mohabbatein (This Is Love), one of India’s top five TV shows. Mawaan, meanwhile, still a struggling standup, has incorporated the story of how he accidentally made his mother a Bollywood superstar into the show he’s taking to this year’s Edinburgh festival.

Mother and son are fast-talking live wires – colourful, engaging and funny. But it’s very clear that Shahnaz is centre stage, and Mawaan waits for his cues with charm and obvious pride in his mother’s achievements. Those achievements, it transpires, are as much off-screen as on: in 1994, when Mawaan was two and his older sister was four, Shahnaz realised they were never going to get the sort of education she wanted for them in Pakistan, so she brought them to Britain. “I knew no one,” she says. “Had no contacts, no money, and my husband said he didn’t have the courage to come. But I knew I had to do it.”

She had always been very strict and focused on our schoolwork, but when she acted in my videos, I saw her in a new light

When her husband followed them to the UK, Shahnaz had another son and turned her single-minded approach to raising the family. “If we needed help, my mum would teach herself, whatever the subject was, so she could tutor us,” Mawaan says. “Then she started tutoring other kids to make some money. We had to study at home for at least two hours a day. Home was more school-like than school: there were colour-coded timetables on the walls and our main furniture was books. I went to school for a rest.”

But as well as Shahnaz’s energy – she was holding down two or three jobs at a time – Mawaan was aware of her dramatic potential, because his mother had form: her father had been an actor and director and, aged three, she had made her film debut. She had gone on to appear in 35 black-and-white Pakistani films – always playing a boy.

She gave up when she hit her teens because her family didn’t approve of acting as a career. She’d never expected to do it again, but was excited by the YouTube opportunity offered by her son, and wanted to experiment.

“She had always been very strict and focused on our schoolwork, but when she acted in my videos, I saw her in a new light,” Mawaan says. “Playful and fun in a different way. She started to open up. It changed our relationship – it was good for us.”

But there were two tough conversations ahead. First, Mawaan’s education. “I loved making those videos; I loved doing standup. I knew it was my future, so I had to tell her that I wanted to stop studying – I didn’t want to go to university. And that was hard for her to hear.”

“It was a big shock, a terrible shock, very disappointing,” Shahnaz says now. “I’d sacrificed so much for Mawaan’s education, and here he was saying he was giving it all up.”

The second difficult conversation took place during one of Mawaan’s videos – but it was so exposing, he says, that he never posted it. “Somehow the topic of homosexuality came up, and my mum said something I disagreed with. And I said to her, ‘What would you say if one of your children was gay?’ My mum came from a different world – it was something she’d never considered.”

Eventually, Mawaan told his mother everything. “I told her I was gay, that I’d done drugs and had a nipple pierced. And I said: ‘I’ve also tried bacon.’” For Shahnaz, that was the final straw. “I cried about the bacon,” she says. “I’m very religious. The truth was that I had an idea of what he would become, and he turned out to be something else. That’s what parents have to learn to cope with.”

When Shahnaz embraced Bollywood, she gave her son the space he needed. She headed to Mumbai and signed a TV contract, working in India for five years. But living away from her family took its toll, and she recently left the show in order to return to the UK.

Mawaan remembers being worried for his mother when she originally left, but when he visited her and they both went to India’s version of the Baftas, buzzing with famous actors and producers, he could see she was perfectly at home.

Soon, she was being recognised on her trips back to the UK. “If we go somewhere like Tooting or Southall, she’s mobbed,” Mawaan says. “And the neighbours were like, ‘Isn’t that lady from No 62 the big star on the telly?’”

There has been a downside: without his mother, Mawaan’s YouTube views have declined. But Shahnaz has given him so much more than material. “The truth is, my mum is an unstoppable force. She’s subverted every expectation her family had of her as a child growing up in Pakistan – she’s broken every convention, defied every rule, and she’s taught me that same spirit. Because of her, I’m aiming for the top.

• Mawaan Rizwan is performing Juice at the Edinburgh festival fringe 1-12 and 14-27 August; tickets frompleasance.co.uk/event/mawaan-rizwan-juice.