Verses with the word unrighteously in the Apocrypha (2 verses):

Wisdom of Solomon 12:23
Wherefore, whereas men have lived dissolutely and unrighteously, thou hast tormented them with their own abominations.

Baruch 2:12
O Lord our God, we have sinned, we have done ungodly, we have dealt unrighteously in all thine ordinances.