A justice minister says he paid private detectives to investigate his colleagues because he was upset about "malicious" newspaper stories.