Etymology
Today it means: In an unrighteous manner. Full definition →
From unrighteous + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.