Etymology
Today it means: While, or as if, dying. Full definition →
From dying + -ly.
Etymology from Wiktionary, CC BY-SA 4.0.