If the AI goal is to serve humans and protect them (if this ever happens) and AI someday realizes that humans destroy themselves, will it try to control people for their own good, that is, will it control man's will to not destroy himself?
If the main goal of AI (which I assume you mean an AGI) is to protect humans and AI will be effective, then AI will always attempt to pursue its main goal (otherwise the assumption of its effectiveness does not hold), even at the expense of other less important goals that it might have. However, if the destruction of a human (or a group of humans) protected or avoided the destruction of other humans, then AI would face a dilemma. In that case, I think it is hard to predict the actions of the AI. Will it act rationally or irrationally? What would it mean for the AI to act rationally? Which parameters will it take into account? Only the number of deaths, or will take into account the future and weight the importance of the lives? How will it define the importance of a human life?
If the AI is static (heuristic and fixed), it will always pursue the stated goal. However, such a system would be "brittle", and either break or produce bad output if confronted with input not previously defined, or outside its model.
If the AI evolves via learning, even where the goal is specific, its interpretation of that goal might change, and produce unexpected results. (The "I, Robot" scenario.)
If the AI is emergent, by which I mean it evolves in way that cannot be predicted, it might evolve new goals.
To answer the question directly:
Hypothetically, if there was an AGI or artificial superintelligence, or ultraintelligent machine tasked with protecting humans, and that AI perceived humans to be destroying themselves, that AI would, if able, take control of human society. (I don't see this as contradicting its goal.)
However, it must be stated that, in a condition of imperfect & incomplete information, where the problem is intractable, the AI is just guessing like we humans do, even if it makes better guesses, as in the case of narrowly intelligent AIs like AlphaGo.