Be alert for influences. Some of the most famous detectives in fiction were based on the experiences of their authors. For example, Doyle based aspects of the character of Sherlock Holmes on his former employer, Dr. Joseph Bell, while Hammett described Sam Spade as the man every private investigator he'd known wanted to be.
Consider your character's motivation. How is your character connected to the mystery? Many authors simplify this by making the character either a private investigator or a police detective. If your character isn't, you need to establish a plausible motivation.
Establish speech patterns and a narrative voice. If your character is also the narrator, does he speak and narrate in the same voice, or is there a contrast? What does the character's style of speech tell the reader about him?
Round out your character with background details. Think about where he lives, who his or friends are, family relations, and the other small details of everyday life. Walter Mosley's descriptions of Easy Rawlins's home life in a working-class black neighborhood in post-war Los Angeles form a central part of the character's appeal.