Socrates plays a starring role in my novel, If Minds Had Toes. I am by no means the first person to make use of him in this way. His contemporary Aristophanes mocked him in a play, The Clouds. He is even better known through Plato, featuring in most of his philosophical dialogues. Socrates never wrote anything down, so he has always been vulnerable to being co-opted as a character. And what a character: renowned in his lifetime and then notorious, sentenced to death for practising his philosophy.

Socrates would roam the marketplaces of Athens, accosting the people and forcing them to engage in testing conversation. At his trial, he characterised himself as a gadfly, irritating the lazy horse that was the city of Athens.

He did not subject his victims to a lecture but made them answer questions, exposing their muddled thinking about justice, goodness or the right way to live. This process of persistent questioning as a route to enlightenment is still known as the Socratic method.

It is telling that Socrates did not write down his ideas. To him, the spoken word was everything - more specifically, the to-and-fro that is possible only in dialogue. I was inspired when, as a new philosophy undergraduate, I read Plato's dialogues starring Socrates. All the reading material up to that stage had been straight prose, delivered from a single viewpoint, often fairly dense or convoluted. Suddenly here was Socrates - someone with a real voice, alive on the page. "Are we late?" he asks at the start of one dialogue, blaming his friend for loitering in the agora, and then turning his attention to the business in hand - chipping away at the confidence of an interlocutor who is foolish enough to think he is wise.

It is easy to imagine Socrates striding around the marketplace, barefoot and scruffy, pushing his grotesquely ugly, snub-nosed face into other people's conversations. He doesn't sound dated because he isn't; his concerns are our concerns. It was always the young people whom Socrates was trying to teach, and I felt that he was speaking to me, an ignorant 20-year-old who needed to know how much she didn't know. I didn't want to disappoint him.

I don't have the option of strolling through the agora to catch prey and pass on my ideas. Even if I could, I don't have Socrates's energy and tenacity. Who does? No, when I wanted to get people interested in philosophy, I had to do what he never did: write a book. I wanted to communicate my curiosity about certain ideas to readers who had not had the chance, and perhaps wouldn't have the inclination, to wade through the original texts: free will, the mind-body relationship, ethics, happiness, scepticism about the everyday world, identity. As soon as I began to gather my thoughts, it became obvious that Socrates would be at the heart of the book.

Once I realised that death would not have halted Socrates in his mission to make people think - that even now he could be in charge of the World of Ideas, the philosophers' section of the Afterlife - the idea for the book coalesced around him. I decided that he would gamble his reputation on a bet - against modern philosophy's greatest grump, Ludwig Wittgenstein. Socrates would venture that engaging with doing philosophy would improve the life of a boy who became the subject of an experiment.

As it happened, persistent inquiry did not turn out so well for Socrates. Athens ultimately disappointed him and rejected his project. He was accused of contradicting the gods and corrupting the youth of his city. His death sentence makes him even more appealing, as the first (only?) martyr for philosophy. According to Plato, he swallowed his poison with equanimity, surrounded by friends, talking for as long as he was able.

In the spirit of Socrates, most of the philosophy in my book is written as dialogue. When I read Plato's Socratic dialogues, I like to think that I could have held my own. Surely I could have said something that would have impressed the great man? But yes, he would have got the better of me, as he did with everyone. The best I can hope for is that he would have approved of my using him as a character, doing my bit part to spread his message that the unexamined life is not worth living.

Lucy Eyre's "If Minds Had Toes" is published in paperback by Bloomsbury (£7.99)