To dream about a detective suggests that excitement is present within your waking life.
To dream that you are a detective suggests that you are seeking out innate talents that you have yet to discover. You may also be attempting to take care of a situation and find verity about an issue that is bothering you.
To dream that you are being followed by a detective suggests a sense of culpability. Your reputation will be placed under a microscope and doubted.