It's not possible to kill the ghost. He is useful for some later puzzles, and there is a way to get the item from his room without killing or harming it.