In 2010, a little box tied up with string was delivered to Emma Thompson's house in London.

Inside the box was a copy of The Tale Of Peter Rabbit and a letter from Peter Rabbit himself. "Dear Emma Thompson," it said, "I'm going to be 110 years old in 2012 and I'd like you to write me a new adventure." Straight away, Thompson was enchanted. There was something about the letter, she says, that spoke, if not to her inner child, then to a particular part of her brain: the part built by the works of Beatrix Potter.

Immediately, Thompson said yes and now, two years later, she's standing at the edge of Lake Windermere, just down the road from the house on the hill where Potter wrote many of her stories, telling me why she said yes, and where her story came from. As she does, memories of her childhood spark out of her: memories like sitting on the wall near her home in Scotland munching a packet of crisps, or playing in the burn that ran round the house, or the bob cotton, or the harebells by the edge of the water. She recalls too her step-grandmother Mollie with her hair plaited and tied up at the top of her head, and a cat in a three-piece suit and a frog in jodhpurs and a rat in a crisp white apron. Out of all of these things, real and unreal, came her story.

Straight away, when you meet her, you can see why it was Emma Thompson whom the publishers Frederick Warne asked to write the story. Potter's original, first published in 1902, is a wonderfully eccentric little book but kind and colourful too and Thompson appears to be all of those things. When we first meet, she comes into the room with a big frock trailing behind her like Jemima Puddle-Duck's and starts chatting away. Then, the following morning, she embraces an idea from her publisher that we should hurl some radishes towards Lake Windermere. Suddenly, the Oscar winner is flinging a root vegetable through the air with a great caber-tosser's howl like it's perfectly normal.

There is a point to the madness, though, because Thompson's continuation of the Peter Rabbit story – the first new story featuring Potter's characters since the originals 110 years ago – is set in Scotland. It starts when Peter sneaks into a basket at the infamous Mr McGregor's farm and ends up on a journey to the Highlands. There, he meets his cousin Finlay McBurney, which leads to the amusing image of a big hairy Scottish rabbit in a kilt. Finlay, it turns out, is a champion radish tosser, which explains all the vegetable throwing earlier.

After we've finished the radish chucking, Thompson starts to read the story out loud, like it's my bedtime, doing all the funny voices and actions, and it's then that we start to understand where The Further Tale Of Peter Rabbit really came from. Mrs McBurney, for example, is based on that step-grandmother Mollie – Mrs McBurney's bunny ears are all tied up in a bun just like Mollie's hair – and Finlay is named after the boy who plays with Thompson's 12-year-old daughter Gaia when they're in Scotland. But it's obvious that, in some way, most of the book has come from the time 53-year-old Thompson spends at the family's home near Dunoon.

"All the Scottish experiences in the book were inspired by my childhood," she says. "The Highland Games for example: when I was little, I sat on a wall with a very rare packet of crisps – we weren't allowed that sort of thing which is why we now have thousands of packets lying everywhere. It's all to do with that time."

One of the other moments directly inspired by Scottish memories is when Peter has to make an escape from an angry Mrs McGregor: "He ran until he could run no more," goes the story. "Panting at the foot of a tall pine tree, he looked about. A stream ran clear over mossy grey stones, harebells bobbing at the rim."

"That's based on a stream that runs round our house in Scotland," says Thompson. "Beatrix Potter inhaled, she digested landscape, in the same way as we did. In fact, George Eliot described the landscape you grow up in as the things you can never take out of your bones – they feed you in the same way as words. So the idea was me, when I was little, looking at water that was so clear and so clean you could just drink it from the stream.

"For me it was a form of magic because I came from London so it was a city child going into the country and seeing water that ran very clear over these grey stones and harebells which are a particularly beautiful rare flower bobbing there at the edge of the water. This was my attempt to do a drawing in words."

That's what Thompson remembers Beatrix Potter doing for her when she was a girl: drawing pictures that stuck in her head, and not necessarily all lovely fluffy ones either. In particular, Thompson was enthralled by the sinister rat Samuel Whiskers, and when she started reading Potter to Gaia, the one they loved was the tale of the fox Mr Tod with its dark wood filled with skulls. That's the thing about Beatrix Potter, says Thompson – there's darkness in there as well as light.

We find some of that darkness up the road at the house on the hill where Potter lived for much of her life. The building, a few miles outside Windermere, sits at the end of a short path next to a field where rabbits play and inside the house you can spot some of the nooks and crannies where Potter set her stories. Here's the chimney Tom Kitten climbed up, for example, and here are the stairs Samuel Whiskers scurried past before he captured Tom Kitten and rolled him up in pastry and tried to eat him. And there it is again: rats feasting on cats; the darkness.

Thompson discovered much of this darkness for herself after she said yes to the Peter Rabbit idea and started doing some research. In particular, she read about the time Potter spent in Scotland (the famous letter in which she first told the story of Peter Rabbit was written at the family's home near Dunkeld in Perthshire). Thompson also read how Potter kept pets there, including a rabbit, and how, when the animals died, Potter would boil their bodies and examine and measure their bones – she was a scientist as well as a story-teller.

"All you need to know about Beatrix," says Thompson, "is that having known a rabbit well, named it, spoken to it, had a relationship with it, she then boiled it. It was not an anthropomorphising of an animal in order to somehow gain that sense of 'they're all like us'. Animals are animals and behave like animals even though they have little coats on and occasionally lose their shoes."

It was while Thompson was reading these stories of animals in little coats, and sitting in the yard of the house in Scotland with her mother, the actor Phyllida Law, thinking of ideas for the book that she realised how much of an influence Potter had been on her. But she also realised there was another influence at work – that of her late father, the actor and writer Eric Thompson, who most famously wrote and narrated The Magic Roundabout.

"Dad wrote some wonderful books," says Thompson, "and one of them was called Dougal's Scottish Holiday and in that there was a big Highland cow and that was when I thought Peter could have a relation in Scotland because after all the McGregors could be Scottish – they could be on their way to Scotland and somehow Peter accidentally gets into the luggage. Why not?"

And so, over one summer in Scotland, Thompson wrote that story under the combined influence of her father and Miss Potter and the book that came out is charming: zippy and slightly old-fashioned and gently funny. It's Thompson's kindly voice overlaid on the ideas that Potter had 100 years ago. Most importantly though, it's not twee or sweet.

"It doesn't talk down," says Thompson, "it doesn't sentimentalise and it doesn't assume children aren't going to understand words like 'soporific'. In one of his programmes, my dad used the phrase 'hoist by your own petard' and he got a letter from a woman saying you can't use phrases like this in programmes for children. He wrote back apologising but using all the hardest and longest words he could find in the dictionary."

Thompson laughs hard at that memory then stops and thinks when I ask her why she's really done this; why has an actor agreed to revive a Victorian children's story? "Because Beatrix Potter was a genius," she replies, "and it's great writing, and while it's for children, it's like my dad said: why do we think of children as people who have to be spoken to in a different language? They are merely us having not lived so long. They are people and they must be spoken to as people." n

The Further Tale Of Peter Rabbit by Emma Thomspon is published by Warne on Thursday, priced £12.99.