Dirk Gently's Holistic Detective Agency by Douglas Adams
ISBN 0671746723 Dirk Gently is a private detective who is more interested in telekinesis, quantum mechanics and lunch than fiddling around with fingerprint powder, so his investigations tend to produce startling and unexpected results. A simple search for a missing cat uncovers a bewildered ghost, a secret time-traveller, and the devastating secret that lies behind the whole human history and threatens to bring it to a premature end. Sadly the cat dies.
First book in the series; the second (and final) book is TheLongDarkTeatimeOfTheSoul
More recently the SalmonOfDoubt has been published, which contains what seems to be what would have been the third DirkGently story. Had it been finished. Or maybe not. There was some discussion of using it to complete the Trilogy. -- GarryHamilton