Pakistan has changed radically since Moni Mohsin left for London 15 years ago. While part of her yearns to go back, she's appalled by the everyday violence, intolerance and corruption. And she fears for the family she left there

Earlier this year, while in Pakistan, I visited my village where I share a house with my sister. Built nearly 300 years ago by an ancestor, it's a traditional courtyard house with fountains, frescoes and wooden balconies. It's also next door to a mosque mounted with powerful loudspeakers. Since we were staying the night, I sent a polite request to the mosque's imam. Would he, just this once, just for the dawn prayer, in line with age-old tradition, call the faithful to prayer in his own voice, instead of using the loudspeaker? He obliged. Two days later someone sent an anonymous note to the house. Before you make any such demands again, it read, remember what happened to Salman Taseer.

Taseer, governor of Punjab, Pakistan's most populous province, was assassinated in January by a fanatical member of his own security guard for proposing a review of Pakistan's contentious blasphemy laws. Taseer was a flamboyant figure who made no secret of his liberal views and lifestyle. Ecstatic lawyers showered his murderer with rose petals and mullahs led thousands in street demonstrations in support of the blasphemy law. Some Pakistanis who live in the west and enjoy every one of its hard-won liberties, set up Facebook pages lauding Taseer's murderer as a hero. Middle-class kids, who salivate over Angelina Jolie and dream of a green card, condoned the murder of "an immoral, westernised liberal". Taseer's murder and its aftermath marked a turning point in my relationship with my homeland.

I live in London. I moved here 15 years ago from Lahore, when I married a London-based Pakistani. My London life is full and varied. I have good friends, engrossing work and live in a nice part of town. My children go to good schools, my husband's work is prospering. We live with security and the rule of law. I have a deep affection for Britain because I spent my late teens and university years here. Much of what I am, I owe to my UK education.

Yet a part of me yearns every day for Pakistan. For that is where my siblings and parents live, where my childhood friends are, where I was born and raised, where I got my first job, where I married. It is also the place that fuels my literary imagination. When I inherited the courtyard house, I thought it would be my retirement home.

For the first seven or eight years of our marriage, my husband shared my enthusiasm for Pakistan. Security, though rocky in Karachi, seemed under control elsewhere. The energy crisis hadn't surfaced. The economy was strong and foreign investors considered the country an emerging market. If you earned in sterling or dollars, buying into Pakistan seemed seductive. Today the economy is flailing. There is rampant inflation, unbridled capital flight and virtually no foreign investment. An acute energy shortfall causing interminable power outages has bankrupted thousands of small businesses.

But it's not the economic uncertainty that has dimmed my enthusiasm for my country; it's the violence fuelled by religious extremism. More than 35,000 Pakistanis have died since 9/11 in assassinations, targeted attacks and suicide bombings. Virulent anti-Americanism – stoked last May by the humiliating raid on Osama bin Laden's compound – is radicalising moderate citizens. Xenophobic chat show hosts spread fear and loathing of the west. Murderous fatwas are passed against anyone who dares to question religious laws. The ISI (Pakistan army's feared intelligence wing) threatens journalists who reveal its links with jihadist outfits. Last month, the battered body of Saleem Shahzad, a journalist who was investigating al-Qaida's penetration of the navy, was fished out of a canal. He was the 37th journalist murdered in the past 10 years. Protests by the journalistic community were met by anger from the ISI and a cowed silence from the government.

This is not the Pakistan I grew up in. When I was a child, mullahs were figures of fun. Notorious for their greed, they were the butt of jokes. Now they are powerful figures running vast madrasas that churn out hate-filled, brainwashed terrorists. Backed by the army, and with massive street power, these new mullahs hold the government to ransom. The Pakistan of my childhood was safe and calm. Other than the old Lee Enfield carried by the guard who snoozed outside the local bank, I hadn't seen a gun. Now Kalashnikovs are as ubiquitous as fridges. Our night watchman carried a stick. Now anyone who can afford them has armed guards. In our neighbourhood, where gates were never closed, ordinary middle-class families live behind high walls.

Kidnappings, violent burglaries and car thefts are depressingly common. At any social gathering, say a dinner or a child's birthday, everyone has a story to tell. A friend recounted how her elderly parents were shot in the legs in separate incidents – one in a car theft and another in a burglary. During my last visit to Karachi, I, too, experienced the city's lawlessness. A couple of boys on a motorcycle cruised up to our car as we were turning into a friend's house and tapped on the window. Thinking they wanted directions, I was about to roll down the window when I noticed the handgun the pillion rider was pointing at me. Fortunately, the friend who was driving our car managed to speed off. Like all my friends who have had such experiences, I did not report it because no one trusts the police.

And yet, until Taseer's murder, I had hoped to return. Lots of countries in the developing world, I told myself, had high crime rates. Pakistan, too, would learn to cope. So although I knew we were ruled by venal generals and corrupt politicians, and though we were terrorised by a fringe of hardliners, I clung to the belief that ordinary Pakistanis were decent moderates, who yearned for economic opportunity and the rule of law. That's why I remained emotionally, financially and intellectually invested in Pakistan. I wrote in its newspapers, owned property there and served on charitable trusts. That's why, despite the bombs, the kidnappings, the fatwas I took my children back every year. So they could feel at home there.

Now 12 and nine, my children do love Pakistan. For them, it is indulgent grandparents, cousins, swimming, pets, gardens and badminton. But they are acutely aware of the darker under currents. They avoid crowded places and, accustomed to taking the tube to school and playing in the large local park in London, find their constant supervision restrictive. My daughter gets irritated by my frequent reminders to cover her legs and do up all her buttons. They worry about my sister and brother-in-law, high-profile journalists and critics of the generals and their proxy jihadists. They know their lives are under threat. They question me about militants. Why do they kill? Why can't they let us be? Why do the police never catch them? I answer as best as I can, but they are not satisfied. Meanwhile, I comfort myself with the thought that in every free, fair election since the formation of Pakistan, religious hardliners have been trounced at the ballot box.

But in the wake of Taseer's murder, I realised that it is we liberals who have been marginalised. Thirty years of state-sponsored Islamism inserted into the curriculum and broadcast on the media has produced a new mindset. Whatever the economic aspirations of ordinary Pakistanis, they now articulate their cultural and national identity in religious terms. Nationalism and religious fervour are fused into one. Even mainstream political parties scramble to prove their religious credentials.

The views and loyalties of secular liberals, particularly if they are westernised, are suspect. A recent article by my niece, identifying Pakistan's army as the chief obstacle to peace, received furious criticism in cyberspace. Outraged commentators questioned her patriotism, accused her of being an American agent and suggested that if she found present-day realities in Pakistan unpalatable, she should "pack her bags and leave". It is this culture of intolerance and intimidation that depresses me most.

The few liberals who dare to take on the mullahs live endangered lives. My sister and brother-in-law live under 24-hour protection. Even when my sister does the groceries, an armed guard accompanies her. My parents live next door. When I stay there with my children, I'm uneasy. When we board the plane for London I'm torn between regret at leaving my family behind and relief at getting away unharmed. Safe in London, I fear for my family's security. Every time the phone rings late at night, I panic. As violence and intolerance mount every passing week, I think of the courtyard house and ask myself if I can ever return for good.

But then I remind myself that freedom is not a gift. It has to be fought for. I will return, perhaps even my children will. Not to the country of my childhood, but to another more grownup place, where mistakes have been made but lessons learned.

Moni Mohsin's latest novel Tender Hooks, is published this month by Chatto & Windus, priced £12.99. To order a copy for £10.39, with free UK p&p, go to theguardian.com/bookshop or call 0330 333 6846