c. 1200, "in a hard manner, with great exertion or effort," from Old English heardlice "sternly, severely, harshly; bravely; excessively" (see hard (adj.) + -ly (2)). Hence "assuredly, certainly" (early 14c.). Main modern sense of "barely, just" (1540s) reverses this, via the intermediate meaning "not easily, with trouble" (early 15c.). Formerly with superficial negative (not hardly). Similar formation in Old Saxon hardliko, German härtlich, Old Danish haardelig.