In December 2007, Atoosa Sepehr arrived in the UK from Iran, knowing no one, her life ahead a clear space, a blank sheet. She was 30 years old, fleeing a disastrous marriage and her escape – more of which later – had been an overnight flit. She’d packed in under an hour, been driven to Tehran at speed by her mother, bought a ticket and raced through departures.

She landed in a London lit up for Christmas, the crowds buzzing. “That did give me a boost, it was beautiful, everywhere was bright, everyone was celebrating,” says Sepehr. “I felt some hope – like this could be home – but no one was talking to me and that was hard. In Iran, wherever you go, people talk to you as if they’ve known you for years. I was very down, scared and homesick.”

I made each dish 20 times to get exactly what I was used to

Alone, in a flat in north London, Sepehr began to cook. “Until that point in my life, I’d just cooked food,” says Sepehr, “but now, I wanted my mum’s food. On Christmas Day, I decided to make her special dish – herbed rice with meatballs. I ate that and spent all day wrapped in a blanket and watching TV.

“And after that, I made more of her food, and my grandma’s, my aunt’s. I was killing myself to get each one right – phoning them up and making one dish 20 times to get exactly what I was used to. It’s hard to put into words, but I was missing home and those tastes, when I got them right, were taking me back – like hearing music that you listened to long ago.”

Soon, the neighbours from her building started to introduce themselves and to ask what she was making, what created these delicious smells? Sepehr began knocking on their doors and offering them dishes. Then she invited them around to share it. Without knowing it, she was building the foundations of a brand new future.

Now, more than 10 years later, these recipes have been written up in Sepehr’s first book, From a Persian Kitchen. She still lives in the same building and still cooks for her neighbours, but London is her home now, a city she loves. A British citizen, she has an English partner of five years and hopes this book will be the first of many.

It’s a world away from the life she expected. Born in the south of Iran, but mainly raised in the central city of Isfahan, Sepehr’s father was an engineer whose hopes for his daughter were no different to those for his son. “My parents were really liberal, my dad was a feminist,” she says. “My mum had the same rights as he did and is a strong woman. She didn’t have a career and loved to look after us, to make life easy for me and my brother. She never let me cook because she wanted me to get on with my school work.”

But Sepehr certainly learned to love food. “My mum was a great cook, a fantastic cook,” she says. “The love I saw her giving the food was unbelievable.

“As children, she’d take us to different places outside the city just to get the right ingredients. I remember going to a farm to get yogurt or milk just out of the cow, and then to another to buy beans. At meal time, whatever we were doing, whatever was happening, we came to the table. Eating is like that for everyone in Iran, rich or poor. It’s a social thing, never just functional. Everything revolves around food.”

It wasn’t until Sepehr left home to study computer science at university that she cooked for herself. After graduation, she moved to Tehran where she built a formidable career in a male world, first working as a computer programmer, then in the stock market. After completing an MBA, she became a high-earning high flyer, importing and exporting steel. “It wasn’t a place for a woman and that’s why I chose it,” she says. “No women were doing that job – so I wanted to.”

On the face of it, Sepehr was forging ahead – a role model for the modern Iranian woman. At home though, her marriage told a different story.

“I married when I was 27. My husband had been my class mate at university,” says Sepehr. “He was sweet, popular, handsome, really charming. When people met him, they’d always say: ‘He’s beautiful, where did you find him?’ Unfortunately, he had two faces – and when we married, he became a completely different person. I didn’t even know him.”

Her neighbours heard the scenes (“He would throw things and threaten to jump from the building to put me under pressure”) and urged her to leave him. But Sepehr kept granting “second chances”.

“I wanted to make it work,” she says. “He was the person I once loved and I could see that he loved me – although that’s something my mum always questions. Now, looking back, was it love or control? At the time, I didn’t want anybody to know unless there was no hope. I never give up on anything easily.”

The couple sought counselling with a psychologist, but when Sepehr was able to see the therapist alone, he took the same line as her neighbour. “He told me not to go back,” she says. “He said: ‘If you were my daughter, I’d want you to divorce.’”

But in Iran, divorce wasn’t easy without the husband’s agreement, which Sepehr knew her husband would never give. He also holds the power to ban his wife from leaving the country. “I felt that would be the first thing he’d do if I tried to end the marriage,” says Sepehr. Instead, she made a plan of her own – quietly arranging a transfer to work in her company’s London office, and applying in secret for a five-year visa. “It was the hardest choice I’ve ever made,” she says. “Carry on in this life – or give up everything and start again.” Only when the paperwork was in place did her parents make the seven-hour drive to Tehran to talk to her husband (who quickly became abusive), then take their daughter back to the family home.

“My husband didn’t know about the job in England, and I thought I’d reconnect with my family, then maybe in a month, move to London,” she says. But that same evening, within hours of arriving in Isfahan, her husband called, begging her to return. When Sepehr refused, he told her that tomorrow, her passport would be revoked. “My mum said: ‘Pack your bag. You must leave tonight.’”

Her book is a love letter to the Iran she left, and a tribute to her family

Sepehr had no air ticket and at this time in Iran, payments were in cash, not credit cards. “The cash machines weren’t open at night so my brother called his friends asking them to quickly bring any money they had.” Soon Sepehr was back in the car with her mother driving her to Tehran airport. “She always follows all the rules, but on this night, she broke every speed limit.” Somehow, they made it. “It was a miracle – everything worked. There was a plane. There was a ticket. I got the flight. The next morning, my dad received a phone call to confirm I’d been banned from leaving the country. It was too late – I’d already left.”

The divorce took four and a half years, by which time, Sepehr’s ex had accepted that she wasn’t coming back. For that period, Sepehr couldn’t risk going home, even to visit, so threw herself into a new life. First, in the steel company, then slowly, the cooking took over. She began a blog, then edited an online magazine. Though she’d never imagined a career in food, it became her comfort, her shortcut home.

Her book is a love letter to the Iran she left. For three years, with no agent, no publisher, Sepehr worked alone, perfecting family recipes, styling the dishes and taking all the photos herself. (She bought a camera and taught herself through YouTube, even though her partner said they’d never be professional enough for a book.) In some ways, says Sepehr, she was a woman possessed.

“If you’d seen me, you’d have thought I was mad. Every morning at seven, I’d get up, go to the kitchen to cook, then I’d spend the afternoon in my living room, which I’d turned into a studio, taking photographs. Every dish has so much emotion and practice behind it.”

The book is also a tribute to her family, dedicated to her parents, her grandmother and her aunt, though she is able to visit them now. They’re proud of her reinvention and, of course, relieved. “When I held the first copy in my hands, I called my dad and said: ‘Would you ever have thought I’d write a cookery book?’ He answered: ‘With you, Atoosa, nothing surprises me.’”

From a Persian Kitchen by Atoosa Sepehr is published by Robinson at £26. To order one for £22.10, go to guardianbookshop.com