Elizabeth Garner's love of Oxford infuses her second novel, The Ingenious Edgar Jones. Set in the mid-19th century, it is the story of a porter's boy who has great gifts for invention and metalwork.

As a child, while working at a blacksmiths in Jericho, he is taken on first by a maverick university professor, who is building the natural history museum, and when he is older, by an inventor. Throughout the story, the Oxford of that time is brilliantly evoked, although licence is sometimes taken with locations and events for fictional purposes.

Elizabeth studied English at University College in the mid-nineties, then moved to London to work as a script editor in the film industry. After coming back to research the book, she decided to settle here once again. But why did she want to set the book here in the first place? "It came from a lot of different angles," she said, when we met at her home off the Cowley Road.

"One of the things that really fascinated me was that I had no idea that that generation of scientists, who were looking into the puzzle of creation, had no sense of science and religion splitting. It was the same thing with the level of inventiveness around at that time; there was no sense of the implication of it. And then, within one generation you had that shift people were writing about the implications of industrialisation - I just thought that was such an interesting tipping point."

For this reason, she thought about setting her novel in the late 1800s, but in the end decided to set it earlier, when the shift in thinking was just starting. "It very much fitted with the building of the museum," she said.

Her brother was a zoology student at the university and she went to a couple of his lectures there. "I remember thinking I've never seen something like this," she said. "The way that it seemed so made, but also like a completely organic thing; you can almost believe that it had grown up out of the land and it didn't quite leave my consciousness."

When she came back to Oxford, she was shown round the museum by the bug expert George McGavin, who is one of the professors there. "He had such enthusiasm for the place, which is what really sealed it for me," she said. Her own enthusiasm comes through in descriptions of how Edgar helps build the huge roof structure, bounding about, attached to a rope.

While researching, she found some wonderful photographs from when the museum was built, although there was no obvious record of how it was done. "I put it together with reading about the Crystal Palace and looking at what kind of technology was around," she said.

This is not just a book about buildings, however; nor, indeed, is it a children's book. It's about how the spirit of one indomitable boy is hurt by a father who wants him to be an academic, and by a professor who uses his talents and then throws him aside. As Edgar grows up, his arrogance about his own abilities, allied with an understandable immaturity, causes him to do stupid things that eventually lead to disaster. Woven throughout is the larger story of what life was like in Oxford at that time, and how the natural history museum was perceived once it was open. Her father is Alan Garner, famous for such children's classics as The Owl Service. She wrote stories as a child and I asked how her father's influence had affected her own wish to write.

She believes that because she knew writers and other creative people as a child, her creative impulse was never shut down. "Both of my parents were very encouraging of me to follow that creative path - not necessarily to be a writer, but to work in a creative industry," she explained. "When I got my book deal, they were both absolutely delighted."

Still working part-time as a script editor, Elizabeth has no plans to leave Oxford. I asked what she liked so much about the place. "For me, it was the opportunities it gave me in terms of relationships and friendships," she explained. "As a place to come back to, I just find it much more diverse than people would expect. I love the fact that I live in a multicultural, multi-class environment. You can go down the road and be in the centre of such a beautiful place." She also finds the landscape remarkable. "I don't think it's a coincidence that so many people have written about it. I did feel that legacy. When I came to the end of it, I thought: 'Oh! I've written an Oxford book'." But what an original slant - an ingenious one in fact.

The Ingenious Edgar Jones is published by Headline at £19.99.