late 14c., in phrase by headlong, from hed "head" (see head (n.)) + adverbial suffix -ling. Altered by folk etymology on pattern of sidelong, etc.