The titan of tartan noir talks about misogynistic trolls, Scottish independence and why this government is taking Britain back to Victorian levels of inequality

Val McDermid is standing in St Cuthbert’s graveyard in Edinburgh, surveying the weathered tombs without much enthusiasm. This interview venue – my choice – came from the misguided belief that an author who has spent her life writing about murder might feel at home surrounded by graves. It turns out that the atmosphere of the place is completely lost on her.

“His talents adored the profession of his choice, his life recommended the gospel which he preached in every relation of life,” I read aloud off a 19th-century gravestone. “He died universally regretted.”

There’s a pause. “Well, he sounds like he was fun on a Saturday night,” says McDermid, who gives a short, sharp laugh and wanders off.

The Scottish novelist is not one to mince her words, either in her books or in person. Now 60, McDermid emerged in the late 1980s with her pioneering Lindsay Gordon series, which featured the “shocking’” inclusion of a cynical lesbian journalist as the main protagonist, and since then she has published dozens of bloody and suspense-filled novels, selling more than 11m copies around the world. Lauded by critics, in 2010 she was awarded one of the highest accolades in crime fiction: the Crime Writers’ Association Cartier Diamond Dagger for outstanding achievement. Her appearance at the Edinburgh book festival tonight, where she will be interviewed by Scotland’s first minister Nicola Sturgeon, sold out instantly.

Of late, McDermid has become something of a current-affairs fixture, speaking out on issues ranging from Scottish independence to the welfare state. A vocal supporter of the yes campaign, she moved back to her native Scotland last year after 40 years living as a “foreigner” in England, and has done little to disguise her disdain for both David Cameron and Scottish Labour since the general election.

And, while politics and crime fiction have never collided on the pages of McDermid’s novels (“Once you start murdering MPs, where do you stop?”) her latest book, Splinter the Silence, the ninth in her Tony Hill and Carol Jordan series, grapples with a subject that has dominated the headlines: the merciless and misogynistic trolling of women online.

She witnessed the tirade of violent and sexist abuse on Twitter targeted at JK Rowling, a close friend, when the author announced her allegiance to the no campaign for Scottish independence, after similar attacks on historian Mary Beard and banknote campaigner Caroline Criado-Perez. A long-time campaigner for women’s rights, McDermid was staggered at what she saw. It was “profoundly depressing”.

“There’s still this instinctive misogyny that kicks out when people have an opinion that doesn’t happen to coincide with a certain kind of guy, or when a woman says something that in any way erodes on white male privilege,” she says, as we perch awkwardly on moss-covered stone. “The vileness of the abuse is astonishing. It makes you wonder, where is this stuff coming from? Who are these people? Well, in general, they are limp-dick – as we say in Scotland, bawbags – who hide behind the anonymity.

“It’s interesting because we have felt over the past 20 years that feminism has made steps forward, that women’s lot is much different, and in many respects much better than it was 30 or 40 years ago. So I was thinking things had changed, that the next generation of men weren’t as institutionally misogynist as the previous were. And then suddenly the internet came along, and gave them a platform to voice their feelings anonymously. And boy, did the bile come out.”

Those who can claw their way to the top will, and the rest will be sweeping the shit out of the doorway

It is not, McDermid stresses, that she thinks no progress has been made at all. Born into a working-class family in Kirkcaldy, she spent the past four decades in England partly because she felt she could not live openly in her hometown as a lesbian without attracting “a certain degree of misogyny and a considerable degree of homophobia”. That, she says, has undoubtedly changed.

So how does she think society has shifted since she first stumbled upon Kate Millett’s formative Sexual Politics as an 18-year-old student at Oxford? “I think maybe it’s becoming more polarised,” she says. “On one hand, you’ve got ‘decent’ men, and on the other you’ve got neanderthal misogynist bawbags – and the middle ground is what’s disappearing.

“And I still think women don’t respect themselves enough, they don’t value themselves enough. They fall for the stuff in the media and in society that makes them devalue themselves, and we need to work on that just as much.” She also expresses bafflement that women feel the need to make a grand announcement about whether they are, or are not, feminists. “If you’re a woman, surely it’s a given?” McDermid sighs. “Sometimes it is hard to see the light at the end of the tunnel.”

As the mother of a teenage boy (he was conceived with her ex-partner via donor insemination), McDermid is equally outspoken about the toll Conservative government policies are taking on the young. If she were starting out today, she says, her career would have taken a very different path.

“If I was a 16-year-old now, I wouldn’t be going to Oxford, that’s for sure, and therefore wouldn’t have had any of the opportunities that opened so many doors for me back then.” An education experiment in the 60s saw McDermid and other gifted children (including Gordon Brown) fast-tracked into university. “I came from a working-class family, but I was supported by a grant system and had my fees paid, so I came out of Oxford with a debt of something like £200. Now people are coming out £35,000 in debt. How do you start a life like that? How do you get your first job if you’re not some middle-class person whose parents can afford to support you through your unpaid internship? How do you do that?”

She shakes her head. “I really worry we are heading more towards the Victorian ethic where those who have the capacity to claw their way to the top will do, and the rest will be sweeping the shit out of the doorway. We’re going back to Bleak House – it doesn’t feel like we’re moving forward at all.”

McDermid is much more optimistic about Scotland, where she believes independence is simply “an obvious inevitability”. Her move to Edinburgh was motivated by “seismic changes” in her life unconnected to the referendum, but she says the timing could hardly have been better.

I said to Ruth Rendell, when you’ve written as many books as you have it’s easier. She said, ‘No dear, it gets harder’

“Given the way Westminster has behaved since the referendum, I think eventual independence for Scotland is a given. There’s a real sense of betrayal here. A lot of irreparable damage has been done to the union and I think there is a political awakening in this country that is not going to go away. A lot of people feel very let down by what’s happened since, and people are energised politically as they’ve never been before.”

After 30 books, is McDermid ever tempted to abandon crime fiction in favour of full-time activism? “God, no,” she says, laughing. But when the words don’t flow as freely as she’d like, she recalls her first meeting with Ruth Rendell, the godmother of crime fiction.

“I remember saying to Ruth, ‘I suppose when you’ve written as many books as you have it gets easier.’ She turned to me as if I was a wee bit slow and said, ‘No, dear, it gets harder.’” McDermid smiles. “It’s only now, as time’s gone by, that I’ve understood what she meant – that if you have that desire to become a better writer, if you have that desire to take every book as a challenge, then it’s never going to get easier.”