1530s, "in a sour manner," from sour (adj.) + -ly (2). The earlier adverb was Middle English soure "harshly, bitterly; with a foul smell" (c. 1300).
Entries linking to sourly
sour adj.
Old English sur "sharp and acidic to the taste, tart, acid, fermented," from Proto-Germanic *sura- "sour" (source also of Old Norse surr, Middle Dutch suur, Dutch zuur, Old High German sur, German sauer), from PIE root *suro- "sour, salty, bitter" (source also of Old Church Slavonic syru, Russian syroi "moist, raw;" Lithuanian sūras "salty," sūris "cheese").
The meaning "harsh of temper, crabbed, having a peevish disposition" is from early 13c. The sense in whisky sour (1885) is "with lemon added" (1862). Sour cream is attested from 1855. French sur "sour, tart" (12c.) is a Germanic loan-word.
-ly 2
common adverbial suffix, forming from adjectives adverbs signifying "in a manner denoted by" the adjective, Middle English, from Old English -lice, from Proto-Germanic *-liko- (cognates: Old Frisian -like, Old Saxon -liko, Dutch -lijk, Old High German -licho, German -lich, Old Norse -liga, Gothic -leiko); see -ly (1). Cognate with lich, and identical with like (adj.).
Weekley notes as "curious" that Germanic uses a word essentially meaning "body" for the adverbial formation, while Romanic uses one meaning "mind" (as in French constamment from Latin constanti mente). The modern English form emerged in late Middle English, probably from influence of Old Norse -liga.