I think it's a bit different than that. I think Bolton is a "true patriot". I put that in quotes because what I mean by that is that I think Bolton sincerely believes that the his own (i.e. Bolton's) policies are the best for America. I think he took the job so that he could push that pro-American agenda. He thought Trump was someone who needed some guidance, and he (Bolton) was the right man for the job, and that he could push his agenda if he had the president's ear.
What he actually saw in Trump once he was up close was someone who talked about Make America Great Again, but when it came to actions, it was all about Trump. Trump wouldn't push Bolton's version of pro-American policies. He saw a childish and half sane person, and he believed that Trump was genuinely dangerous to America. I think he wrote the book to expose Trump and to try to convince people that Trump is dangerous and ought to be thrown out. (Well, he probably also wanted to make some money, but doesn't everyone?)
So, it isn't so much justice or revenge. It's doing what Bolton thinks is best for America.
Maybe that gives Bolton more credit than he deserves, but that's the way I see it.