Quoting Veritatis Splendor:
Reason attests that there are objects of the human act which are by their nature "incapable of being ordered" to God, because they radically contradict the good of the person made in his image. (...) The Second Vatican Council itself, in discussing the respect due to the human person, gives a number of examples of such acts: "Whatever is hostile to life itself, such as any kind of homicide, genocide, abortion, euthanasia and voluntary suicide, (...)"
So I believe that we can say that according to the teaching of the Catholic Church, genocide can never be ordered to be carried out by God and committing it is always evil.
Still, in the Bible we have examples of
GodMoses (see comments) ordering His believers to commit genocide:
But in the cities of those nations which the LORD, your God, is giving you as your heritage, you shall not leave a single soul alive. You must doom them all - the Hittites, Amorites, Canaanites, Perizzites, Hivites and Jebusites - as the LORD, your God, has commanded you, lest they teach you to make any such abominable offerings as they make to their gods, and you thus sin against the LORD, your God.
This most obviously satisfies the definition of genocide, as stated by the United Nations:
Genocide is defined in Article 2 of the Convention on the Prevention and Punishment of the Crime of Genocide (1948) as "any of the following acts committed with intent to destroy, in whole or in part, a national, ethnical, racial or religious group, as such: killing members of the group; (...)"
There seems to be incongruity in Catholic teaching here. How does the Church explain the fact that while it declares it impossible for God to order genocide, such an order from God seems to be described in the Bible?