91 Days - mafia/detective style anime. MC basically joins mafia to find who killed his family. really good.
beautiful bones sakurako's investigation - this is detective style anime but its about using bones to find clues rather than normal stuff aka anthropology. still really good.
erased - extremely good mystery anime. there is supernatural stuff in it where MC goes back in time to basically be a detective and find out what happened and what led up to the present events and to change it.
acca:13 territory inspection dept. - highly recommend this anime. mystery anime but the MC is basically a detective
Although it's not anything close to realistic, I would have to agree with a few prior posts and suggest watching Death Note. It's the first anime to come to mind when I think of a detective anime.