I've come up with a great (or at least better than before) backstory for Doyle. I'll explain further in the future, but, in a nutshell:
Years before the beginning of the story, Doyle was a literature teacher, and he enjoyed his job. He had always lived with his parents, since the economic situation was not good enough to buy a house. As time passes, both of his parents die (probably natural death). Because of Doyle's introversion and bad reputation in the village (due to his mental state), the only thing keeping him connected to society and giving him the opportunity to talk about his thoughts is being the literature teacher at the local school. That's until he gets fired (I still don't know the reason). He loses all the reasons to go outside his parents' (now his) house, thus finding an exit to his sadness and loneliness in the detective novels on his bookshelf.
Then he ends up inspired, crafts himself a homemade detective outfit and goes outside to find his companion (meeting Agatha) to solve cases, but that's actually part of the story, not the backstory.