The book you might be thinking of is called "Daemonologie" which was written by King James VI of Scotland, who later became King James I of England. This book was published in 1597 and was a treatise on witchcraft and demonology.
It's easy to get the two names mixed up because James VI of Scotland became James I of England.