Old English halig "holy, consecrated, sacred; godly; ecclesiastical," from Proto-Germanic *hailaga- (source also of Old Norse heilagr, Danish hellig, Old Frisian helich "holy," Old Saxon helag, Middle Dutch helich, Old High German heilag, German heilig, Gothic hailags "holy"), from PIE *kailo- "whole, uninjured" (see health). Adopted at conversion for Latin sanctus.
The primary (pre-Christian) meaning is not possible to determine, but probably it was "that must be preserved whole or intact, that cannot be transgressed or violated," and connected with Old English hal (see health) and Old High German heil "health, happiness, good luck" (source of the German salutation Heil). Holy water was in Old English.
Holy is stronger and more absolute than any word of cognate meaning. That which is sacred may derive its sanction from man ; that which is holy has its sanctity directly from God or as connected with him. Hence we speak of the Holy Bible, and the sacred writings of the Hindus. He who is holy is absolutely or essentially free from sin; sacred is not a word of personal character. The opposite of holy is sinful or wicked; that of sacred is secular, profane, or common. [Century Dictionary, 1895]
Holy has been used as an intensifying word from 1837; in expletives since 1880s (such as holy smoke, 1883, holy mackerel, 1876, holy cow, 1914, holy moly etc.), most of them euphemisms for holy Christ or holy Moses. Holy Ghost was in Old English (in Middle English often written as one word). Holy League is used of various European alliances; the Holy Alliance was that formed personally by the sovereigns of Russia, Austria, and Prussia in 1815; it ended in 1830.
-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.