Afghanistan's first female director, risks death to go to work each day – shooting a film in Kabul is a brave act of defiance. Here she talks passionately about women's equality and her fear that the return of the Taliban could kill Afghan cinema for ever

It's four degrees below zero in a high-security police compound in south-west Kabul. Inside several thick concrete walls topped with razor wire, 60 officers from the city's antiterrorist unit stand to attention in neat rows, blinking in the harsh winter sunlight, waiting for their orders. But today the commands won't come from their general. Today the boss is Saba Sahar – actress, screenwriter and Afghanistan's first-ever female film director.

"Cut!" shouts Sahar. She turns to the general standing awkwardly on the sidelines beside her soundman. "The troops are too far away from the camera, Mr Commander," she says. "We can't see them."

Fourteen years after the Taliban ordered all Kabul households to blacken their windows so women could not be seen from the outside, Sahar is striding in front of the camera, in shiny stilettoes, with sparkling blue eye shadow and a gold nose ring. The full-length burqa is still the choice of many Afghan women should they ever go out in public but Sahar prefers a turquoise headscarf, held in place by oversize sunglasses. She radiates Hollywood glamour, Kabul-style.

In a country where only 12% of women can read and few have jobs, Sahar is directing her sixth production. Commissioner Amanullah is a 24-part series on the Afghan police force. She's also playing the lead: a bold, incorruptible female cop, fighting terrorism in a man's world.

All Sahar's productions have been police dramas and the heroine of each, played by Sahar, is a female officer, standing up for justice and integrity against the bad guys, be they Taliban, warlords or drug barons. She's a kind of superhero, doing kung fu high-kicks in traditional dress, carrying victims to safety over her shoulder or riding a motorbike with no hands while firing a gun.

Sahar trained as a police officer herself and began working for the Interior Ministry 22 years ago, aged 14. She still works part-time for the Kabul police and that may account for the ease with which she directs armed troops as her extras. She's equally comfortable ordering a crew of foreign journalists around: I'm making a documentary about the Afghan film industry for Channel 4's Unreported World and she's allowed me on set so long as I don't get in the way.

"I want to show that Afghan women are capable of doing anything men do," she tells me. "I want to show the conservatives who lock their daughters and wives at home that they should let them out to get an education, earn some money and help rebuild Afghanistan." She's determined that her two sons and two daughters will grow up in a country where everyone is equal.

But living by example comes at a price. "Every morning when I leave the house I know I might get killed, might never see my family again," Sahar says. A few years ago, anonymous callers started bombarding her mobile with death threats. "They told me to say goodbye to my loved ones because I'd soon be dead."

She reported the threats to the Interior Ministry and the calls were traced to a phone in Kandahar. But they didn't stop. "They called me again and asked why I'd gone to the authorities. They said that even if the whole government is behind you we will still kill you. We will murder you on the street, in public."

Sahar now never leaves the house without her pistol and armed bodyguard.

She grew up at a time when Kabul was full of record shops, theatres and cinemas and always wanted to be an actress. She first appeared on stage at Kabul theatre as an eight-year-old, bold and controversial even then, because she did it without her family's permission. Her family tried to stop her but when her father saw her perform, he gave his blessing.

She was writing her first screenplayin 1996 when the Taliban seized power and outlawed cinema. They declared that moving images were heretical and that music, films and dancing led to "moral corruption". That year, militiamen stormed the offices of Afghanistan's state-run film company, burning whatever they found, destroying most of the country's archives. Sahar fled to Pakistan. Several of her friends died from police beatings after they were caught watching films.

She applied for asylum in the US and was granted a visa in 2001, but turned down the chance of a new life in the west when the Taliban fell. Sahar returned to Kabul and founded her production company, joining the brave few directors striving to rebuild the Afghan film industry, spurred by the promises of freedom brought with the arrival of foreign troops.

When her first film, The Law, had its 2004 premiere in Kabul, the cinema's owner feared the movie would cause a riot and demanded police protection. But the screening was peaceful and The Law became an unexpected hit, outselling the Bollywood classics that had begun to see a roaring trade in Kabul's DVD bazaars.

In 2012, two different Afghanistans co-exist, uneasily: a new generation fighting for a more liberal and open future and a strict, conservative Afghanistan willing to punish any behaviour considered un-Islamic.

Death threats are only part of the challenge dissenters face. In a country where women used to be flogged, imprisoned or killed for being visible in public, film directors have to find actresses prepared to perform on screen. Even if they can find the cast, equipment, crew and funding, they're still working in a war zone.

"Making movies is my love," Sahar says. "I love my country. I want to show people that there's more to Afghanistan than fighting, drugs and terrorism. If I die for asking for my rights and inspiring other women to fight for theirs, then I'm ready to lose my life."

The Taliban are fully prepared to take it from her. In a safe house on the outskirts of Kabul, I meet a Taliban commander. "The kind of movies that are for entertainment are against sharia," he says, calmly, his voice muffled beneath the turban that hides all but his eyes. "Any film that is against the law and the principle of sharia should be banned."

Makers of these films, he continues, should be told that what they are doing is wrong. "If that doesn't stop them, we will punish them according to sharia." That punishment, he says, is death.

The commander is relaxed, quietly confident. He has reason to be. Everyone I speak to in Kabul – from actors and directors to the officers at the police compound – is convinced the Taliban will soon have a stake in power and that Afghanistan will return to fundamentalism once foreign troops leave in 2014. All the Taliban need do is bide their time.

But you'd never guess it if you took a walk through Kabul's heaving DVD bazaars. Towers of brash covers encased in cellophane line every surface. This is where Afghan movies meet their audience: Kabul's six cinemas only show Indian and Pakistani films and are often empty. Most viewers would choose the security of their home rather than brave the city streets to watch a film.

Action movie actor-director Salim Shaheen, who has starred in 107 movies: ‘I’ll never give up making films.’ Photograph: Jonathan Saruk/Getty Images

My guide is Salim Shaheen, Afghanistan's most prolific film star. He's a ball of theatrical energy bouncing through the bazaar. I'd believe his claim that he's only 42 if he hadn't already told me he's been a making films for more than 30 years. Shaheen has directed and performed in 107 low-budget, high-octane action movies, with titles such as Champion, Destiny and Unbeatable, several made while he was in exile in Pakistan during Taliban rule. He's one of the most recognisable faces in Afghan cinema. "Not everyone can become a superstar," he says with a grin as he waves a path for me to walk through his fans.

Action films have the lion's share of the market; in a country beset by violence, audiences expect to see it on screen, often in graphic, bloodthirsty detail. Shaheen's face peers from the black, orange and red movie posters, often wielding a Kalashnikov, sometimes with a rag tied across his forehead like Rambo – a constant source of inspiration, he says.

Bollywood films have sold well here since the fall of the Taliban, but few Afghans can understand Hindi and subtitles are almost useless when literacy levels are so low. Over the past few years, there's been an explosion in the popularity of films shot in Dari and Pashto. Viewers want films in their own languages, telling stories that relate to their own culture and experience. One trader tells me that when a new Afghan film is released he can sell 1,300-1,400 copies a day, even though, at 80 pence each, they cost more than a day's wages for most people.

"All my films are different. Each has a different message for society," says Shaheen. "My stories are about violence against women, stopping drug use and putting an end to terrorism, not only in Afghanistan but worldwide. We work hard on the script to make sure we have positive messages for our nation."

Shaheen knows that Afghan cinema is a deadly business. He lost eight members of his crew in 1993, when a rocket hit one of his film sets. It was during the turmoil of the civil war and Shaheen never discovered who was behind the attack, although he's convinced he was targeted deliberately. "I've paid for the 107 films I've made with the blood and lives of my crew," he says. "I will continue in their name. I'll never give up making films."

But if the Taliban come back, films will be banned and Shaheen says he will have to leave. He's convinced the new, liberal Afghanistan he's been helping create will disappear with the departure of foreign troops. "I'm not a military man or a politician, I'm a film-maker. But I believe there's going to be a civil war. If you come back here you won't see a living soul – Afghanistan will be covered in dead bodies."

I arrange to see Sahar again on a Saturday. Meeting at her house is out of the question – her brother-in-law is deeply religious and strongly disapproves of her and she fears my presence would make her home life even more fraught – so we meet at her office. She's drinking steaming tea, curled up on a sofa, surrounded by her crew, even though no one is supposed to be working today.

Sahar won't talk about her husband and children. I later learn she's become estranged from them – something almost unheard of in Afghanistan.

"I've sacrificed many friendships. I have fewer visits from my family. My uncle now refuses to see me because he's against what I'm doing," she says with a heavy sigh.

"My mum, my sisters and my brothers support me but the rest of my family doesn't."

It seems Sahar has found another family to replace those who have abandoned her: the family of people who make films with her. Even on her day off, they are the people she relies on for support and warmth. But she knows this family, too, could be torn apart. "If the Taliban come back in any form, women like me won't be free to act in films or make them. I'll have to leave the country."

For now, Sahar would rather focus on the present: a golden age for Afghan cinema, a precious period where homegrown films can thrive, so long as the people who make them are brave enough to go to work each day.

Her next project will be a film about the Taliban. "I'm hoping it will get prizes at Cannes and the Oscars," she tells me. "I'm not sure whether I'll be alive or not after I make that film. But with God's help, I will."