To see a detective in your dream, represents an aspect of your personality that is suspicious or thinks something doesn't make sense. You may be trying to solve a mysterious problem, or don't trust someone.
Negatively, dreaming about a detective may reflect fear of others discovering unpleasant or embarrassing information about you. Fears of hidden truths being discovered about you. Feeling that people don't trust you or are won't stop looking for ways to humiliate you. Fearing being exposed for things you are guilty of. Anxiety about lies you told be discovered. Unrelenting nosiness.
To have a detective following you in a dream may be a symbol for a lingering sense of suspicion. It may also reflect a fear of being caught or figured out.
Example: A man dreamed of a detective. In waking life he was in the middle of a lawsuit and he feared having every aspect of his life investigated by the opposing side.