There is no way someone can be put in jail for writing a book. Unless it contained libel, or violated copyrights, or maybe even if it treasonously contained classified government information like nuclear secrets, then writing a book falls under freedom of speech. Of course he could be fired if his superiors thought it was appropiate. If this type of thing became a problem, then I would imagine voters would elect a police chief who would be willing to take care of it.