Your boss can't prevent you from writing this book, however he can terminate your employment if you do. That is unless you are afforded protection against such an action under the terms of an employment contract or union agreement. Otherwise, as an "at will" worker, your company can set the conditions of employment much as it sees fit, absent some form of legally actionable discrimination.