To answer this question, we first have to understand that Netzsche's historical understanding ("geneaology") of morality was based on his conviction that there had been a revolution in Western thought, which he called a "slave revolt." By this he meant that a certain group of people formerly deemed ignoble, mediocre, and in a word, "bad," had imposed a new morality on the world. People who had formerly been regarded as good and noble were now cast as "evil." These ideas, incidentally, were expressed in many of Nietzsche's works, most notably Beyond Good and Evil and The Genealogy of Morals.
In Nietzsche's words, the "good," whom he describes as the "noble, the mighty, the high-placed and the high-minded," had viewed as "bad" everything that was "lowly, low-minded, common, and plebeian." But over time, a new morality was established. Beginning with "the Jews" and continuing over the next two milennia with the establishment of Judeo-Christian morality in the West, the "slave revolt in morality" painted many of the characteristics that had been "good" as "evil." In what Nietzsche characterized as a "secret black art of a truly grand politics of revenge," those who sought excellence in this world were deemed "evil," because they were self-interested, self-aggrandizing, and unconcerned by the so-called slave morality. Meanwhile, the "herd," as Nietzsche calls them, were able to impose their morality, which was a negation of life rather than an affirmation of it, on the world. So this was the transition, or inversion, of the "bad" and the "evil."