Madly means in a wild uncontrolled way. Wave madly, madly in love, running madly about.
Madly in love is much its commonest use and is entirely positive. Otherwise it describes frantic activity: waving madly, dashing madly. Note mad, which in British English means insane or angry and in American English mostly means angry; madness; and that mad about something in British usage means enthusiastic about it — mad about horses — while in America it means furious at it, which is a genuine transatlantic trap.
1adverbmadlyIn a wild uncontrolled way.
“The dog ran madly around the garden, barking at the birds.”
2adverbextremelyExtremely, of love.
“He fell madly in love with her the moment they met.”
madly is a manner of wildness.
Old English gemaedd meant made insane, from a verb meaning to change or damage. The same root gives the Old English for a maiming, so madness began as an injury rather than a state of mind.
Middle English
madly
English, today
madly
From Middle English madly, madli, medliche, equivalent to mad + ly.
Etymology from Wiktionary, CC BY-SA