Philby is a promising surname to spot on the spine of a spy thriller. But for author Charlotte Philby being the granddaughter of Britain’s most famous communist double-agent has not always been quite so handy.

The writer, who has just landed a book deal with Harper Collins for her debut novel, The Most Difficult Thing, has grown up with the legacy of Kim Philby’s betrayal and defection to the Soviet Union in 1963 once he was exposed as the elusive “third man” in the Cambridge spy ring.

“When I think about what Kim did what I’m always left with – and more so now that I have children of my own – is how do you walk out on your family?”, said Philby. “What compels a person to do that? And then I started to wonder what would happen if the person who walked out – regardless of their motivations – was a woman? That’s my jumping-off point.”

Her thriller, described by its publishers as a cross between John le Carré’s The Night Manager and Louise Doughty’s Apple Tree Yard, straddles the genres of modern domestic drama and classic spy mystery and it opens with a mother who is intending to leave her family for ever. Told by two women, and set in London and on a Greek island, it is based on a real case, in Africa.

The common assumption that her grandfather followed “a linear path leading to what he did” is wrong, Philby, 35, believes. So instead her book concentrates on how family and friends are treated once a key decision has been taken and the world becomes “darker and uncontrollable”.

She and her late father, the spy’s eldest son, John, both had to live with continuing speculation about the motivation for Philby’s treachery.

“His story does not really go away, because there is no conclusion. Kim died when I was five, so I had a limited amount of direct interaction. But I do have a strong sense of being in Moscow with him and my family,” she said. “What happened has coloured my life and, of course, formed a large part of my dad’s sense of himself.”

Her father, who died in 2009, took pride in her grandfather’s “great integrity” and “revered his intelligence and charisma”, said Philby, a journalist who grew up in London. “He also respected his rebelliousness and his refusal to toe the line. Like Kim, my dad never cared to follow the crowd or abide by the rules, and he celebrated that trait in his father, regardless of the personal cost.”

Facebook Twitter Pinterest Kim Philby holds a press conference at his parents’ home in London in 1955. Photograph: AP

In a family letter, never shared publicly before, the defector wrote from Moscow in the year his granddaughter was born. He imagined her future life at university somewhere in 2000, “studying hard or (more likely) raising hell. I say more likely raising hell, because what with your Daddy, your Grampa and your great-Grampa, you have a great tradition of misbehaviour to maintain,” Kim Philby wrote.

The novelist, who was shortlisted for an investigative journalism award at the Independent and now works for Marie Claire, has never been ashamed of her family name, but says it has given her a grim understanding of the lasting impact of espionage. As a child she remembers the phones being tapped and the knowledge that their home was under surveillance.

Her grandfather had been the senior officer of Britain’s Secret Intelligence Service, MI6, in Washington when he was ordered to investigate another double agent, Donald Maclean, suspected of passing secrets to the Soviets. Instead, Philby tipped him off and organised his defection, along with that of Guy Burgess. Philby stepped down from his MI6 position when suspicion also fell upon him, but kept up links with the service while writing for the Observer from the Middle East.

“When people talk about Kim’s deceit, it’s always political – how could a man betray his country? If he had been a woman the conversation would have been very different. Men leave every day, it’s an established part of the narrative but when women leave, they’re vilified in a way that men aren’t.

“There is so much speculation still about why he did it and what side was he really on. For my first book I wanted to steer away from that, because in a way, although it’s his experience that sparked my interest in the murky world of espionage, what I wanted to convey is the level of emotional dishonesty involved and that you can never truly trust people around you, or expect to be trusted, in that world,” she said.

The Most Difficult Thing will be published by Borough Press (HarperCollins) in hardback in spring 2020. Website: charlottephilby.com