Since its publication in 2018, Will Eaves’s fifth novel, Murmur, has been gradually accruing prize nominations – longlisted for the Rathbones Folio, shortlisted for the Goldsmiths, co-winner of the Republic of Consciousness award for small presses. This run of success culminated last week in victory with the Wellcome prize, worth £30,000, which celebrates books on the topic of health and medicine. “This is absolutely terra incognita for me,” says 51-year-old Eaves in his south London kitchen. “My books normally sell four and a half copies.”

But the Wellcome is an apt prize for an author who has long been fascinated by the intersection between science and literature (his current project, The Neuromantics, is a podcast focusing on fiction’s links with neuroscientific research). And Murmur is an extraordinary piece of work; dense, allusive and humane, it riddles away at the mysteries of consciousness, artificial intelligence and language itself. It was inspired by the experience of mathematician and world war two code breaker Alan Turing, who was forced to undergo chemical castration treatment as an alternative to jail after being prosecuted for homosexuality in 1952, and died two years later from cyanide poisoning: the inquest ruled it was suicide.

Through journals, letters and fantastical dream scenes, Eaves imagines the physical and mental transformations caused by the hormone injections. “That’s the nub of the book – how a formal person, both intellectually, procedurally, and by temperament, comes to re-evaluate himself in the wake of this intimately disordering experience.” Towards the end of his life Turing sent a friend postcards that, says Eaves, “describe the process of just slightly falling apart. They are very moving because they’re comittedly intellectual, yet the moorings are beginning to slip. You’re always looking for a suggestive moment in writing. I found it there.”

He is keen to stress, though, that the book is mostly speculation, so rather than using Turing’s name creates an avatar called Alec Pryor. “I’m not a mathematician; I’m dealing with some of the meta-mathematical issues as well as the moral tragedy of the life. I didn’t want to be in that tacky, sticky situation of attributing to a real person things they did not say.” Eaves is working through his own ideas about consciousness throughout the novel, and “I needed the latitude to find out what I wanted to do”.

Murmur isn’t the only current novel to fictionalise Turing; he appears under his own name in Ian McEwan’s Machines Like Me, set in a counterfactual 1982 in which the father of artificial intelligence has opted for a year in jail rather than hormone injections, then gone on to enjoy the sexual freedoms of the 1960s and fulfil the early promise of his groundbreaking work. Eaves raises his eyebrows. “How interesting that he’s done that. I think it’s the sort of thing that only a straight man would do. Sort of missing the point. Turing didn’t think he was guilty of anything, that’s why he ended up confessing so quickly. The idea that he might have accepted that he’d done something wrong and go to jail I think is possibly mistaken.”

Alan Turing … ‘I like the fact that he was camp and funny and marched around singing Disney songs’ Photograph: Universal Art Archive/Alamy

Over the years he spent working on Murmur, the importance of Turing’s role as a gay hero “absolutely grew on me. I’ve not that much attachment to being called a gay writer, but I am. I like the fact that he was camp and funny and marched around King’s College [Cambridge], singing songs from Disney. He could be quite an annoying person, too – apparently he had a very high machine-gun laugh. He loved Snow White and the Seven Dwarfs, which is very camp. And of course it’s all about consciousness. The slave in the mirror is a reflection of the queen, who then reveals his autonomy by saying: ‘Well, actually you’re not the most beautiful.’ The copy isn’t a copy at all. It’s got its own life. It’s a terribly creepy film.”

Images from Snow White are refracted throughout Murmur, along with Jungian archetypes, Turing’s own work in mathematical biology, and metamorphoses of all kinds. Doubles and reflections abound as Eaves chases the “murmur” of the mind’s inner workings: “an underground stream, a spring that rises continually without quite reaching the surface of expression”. Appropriately enough, the reader has to become a kind of codebreaker, as Pryor’s hallucinations stretch back to the ice age and forward into possible futures of machine consciousness. One section conjures a vision of today’s hyper-connected, smartphone-addicted world, with a cafe full of “endlessly communicating lovers who don’t talk”.

Smart technology, says Eaves, is changing our manner of cognitive absorption - it’s just too early to say what the effects will be. “Something has happened to species memory and our memory more personally. Something has happened to our grasp of context that is having an effect on the way people learn and behave, while in terms of relations, the promise of connection has replaced in some cases connection itself. What presents itself as choice is really a menu given to us by corporations. They are controlling how we interact. It’s a very powerful and disturbing thing. We should be worried about it.”

Eaves traces his interest in artificial intelligence all the way back to his first novel, 2001’s Whitbread-shortlisted The Oversight, and his second, Nothing to Be Afraid Of, which is “all about masks and whether you can really detect agency in people”. Born one of four in Bath in 1967, he came of age in the 80s, during the first wave of personal computing: “At the time I thought it was boring, but it then came to describe our entire world!” He was, he says, “a curious child, in both senses of the word”, and ever since has maintained “a sort of curiosity that has never particularly wanted to be one thing. I’ve always believed that self-education is something that goes on all your life.”

As a young teenager, he felt like a late developer, which was “one of the most profoundly influential things on my life – that fundamental thing of feeling left behind. I so wanted not to be the bright spark with the high voice in the corner.” After studying English at Cambridge he worked briefly as an actor (“very low-grade professional, though I did get my Equity card”) before moving into journalism.

It was on a whim that he went to a weekend conference on Turing around the time of his centenary in 2012, and then began reading about philosophy of mind. This was a difficult time for Eaves. He had been arts editor at the TLS for 17 years, where it was a struggle to carve out imaginative space to write fiction. He left in 2011 to teach English and creative writing at the University of Warwick, but though his third novel, the family saga This Is Paradise, and a poetry collection were coming out, he felt that creatively he had “nothing else in the tank at all”. “My relationship ended. I was heartbroken, really, and I didn’t handle it terribly well. I began to panic about what, if anything, I might do next.”

When he was asked to give a lecture presenting new work, it was a real “rabbit in the headlights” moment – until he returned to the journal he’d kept while travelling around the American south in the 90s, interviewing people about the Waco siege. “I ended up with this very unusual cacophonous short story, and thought: ‘I’m really enjoying this.’ I started going through all my notebooks and journals.”

This process led him to the two books he published before Murmur: 2014’s The Absent Therapist, a series of miniature dramatic monologues, and 2016’s The Inevitable Gift Shop, subtitled “a memoir by other means”, which intersperses poems with snatches of literary criticism and autobiography. Born out of a sense of both freedom and frustration, they mark a sea change from conventional novels to fragmentary, episodic works that fold in life writing, science and philosophy without ever sacrificing a wickedly dry sense of humour. One character in The Absent Therapist recounts hearing “a wonderful story once about some man who came round for sex and said: ‘Give me a blowjob, then.’ And Terry said: ‘That’s not very romantic,’ and the man sighed and said: ‘All right. Give me a blowjob in the rain.’”

Images from Snow White and the Seven Dwarfs are refracted through Eaves’s novel. Photograph: Allstar/Disney

The silent presence of a gregarious, unjudgmental listener is implicit throughout The Absent Therapist. “It has been very helpful to me to meet a lot of different people and to have sex with a lot of different people,” Eaves says. Being gay has been “a blessing. You learn to cut people some slack, and you don’t think it’s the worst thing in the world if someone sleeps with someone else. You learn how various are the ways of tolerating each other and being kind and offering help.”

It was Eaves who approached Charles Boyle, the man behind tiny indie press CB Editions, to persuade him to publish The Absent Therapist. “I thought: ‘Pffft, who’s going to do this?!’ A major publisher wouldn’t want it – and my three books at Picador hadn’t sold at all.” And he didn’t take no for an answer: Boyle originally wrote back to say he’d taken on too many manuscripts already. “I’ve never done this before in my life, but I pushed him, said: ‘If you think it’s good enough to print, do it. Don’t tell me you’re too tired!’ And he said: ‘Oh, all right.’”

During this period Eaves was also struggling with chronic back pain, which at one point put him in hospital. “It happened fast and didn’t go away, so was quite shocking. It’s been a big physical change for me. I’ve come to see it’s very normal – many people go through it. Life is a much chancier thing than we imagine: we’re not very far from the edge at any point.” His back is much better now, “but in a sense Murmur is about that pain. I wanted to capture the idea of Alec being harried by his inner life, but also of turning to face it, to listen more carefully. Pain forces this on you. Heightened proprioception plus vast emotion.”

All novels, of course, are autobiographical – “just not in the ways that we might suppose or wish to lay claim to,” Eaves says wryly. There are irresistible correspondences with artificial intelligence, too: novels are “about the surprises you get from apparently determined processes. A book is determined, it’s artefactual, and then it becomes this other thing, it has another life in people’s minds but also in reality. It accretes different histories depending on what happens in the world.” One example of this is that although the action of Murmur is set in the 1950s, the book comes out at a time when trans issues and hormone therapy are urgent topics.

Does Eaves plan to write more about artificial intelligence? More than six decades after Turing’s death, he is “keeping a weather eye” on the core issues: “material embodiment, point of view, the place in the objective world for the subjective. Those things aren’t going away. A lot of tech speak has a surprising amount of anthropomorphised language, which goes by under the radar. When people say: ‘The computer sent me a message’ – you know it’s a message because you are a conscious agent, the computer was just doing its thing. We keep taking our eye off that ball, which is slightly worrying because it suggests we are willing to cede authority or humanity.

“In certain situations, and it doesn’t take much, where there is a plausible authority, people will cede responsibility and humanity to that. That’s what happened to Turing. And the irony is he gave his best years fighting to defeat such a dictator.”

• Murmur is published in paperback by Canongate this week (£8.99). To order a copy go to guardianbookshop.com. Free UK p&p on all online orders over £15.