I'm trying to recall, does any HP Lovecraft story actually feature a private detective/private eye (male or female) as the main protagonist? The answer should be specifically HPL and not any derivative works by other authors/artists.
The protagonist of Lovecraft's short story The Horror at Red Hook is Thomas Malone, a detective with the NYPD.
Thomas Malone is the police detective from The Horror at Red Hook. and there is a retired police detective John R. Legrasse in The Call of Cthulhu in section II, "The Tale of Inspector Legrasse".
There were also unnamed private detectives mentioned in The Case of Charles Dexter Ward.