also hang-nail, "sore strip of partially detached flesh at the side of a nail of the finger or toe," probably a 17c. or earlier folk etymology and sense alteration (as if from hang (v.) + (finger) nail) of Middle English agnail, angnail "a corn on the foot," from Old English agnail, angnail. The literal sense probably is "painful spike" (in the flesh). The first element would be Proto-Germanic *ang- "compressed, hard, painful" (from PIE root *angh- "tight, painfully constricted, painful"). The second element is Old English nægl "spike" (see nail (n.)).
Compare Old English angnes "anxiety, trouble, pain, fear;" angset "eruption, pustule." OED also compares Latin clavus, which "was both a nail (of iron, etc.) and a corn on the foot." Similar compounding in Old High German ungnagel, Frisian ongneil.
*angh-
Proto-Indo-European root meaning "tight, painfully constricted, painful."
It forms all or part of: agnail; anger; angina; angry; angst; anguish; anxious; hangnail; quinsy.
It is the hypothetical source of/evidence for its existence is provided by: Sanskrit amhu- "narrow," amhah "anguish;" Armenian anjuk "narrow;" Lithuanian ankštas "narrow;" Greek ankhein "to squeeze," ankhone "a strangling;" Latin angere "to throttle, torment;" Old Irish cum-ang "straitness, want;" Old English enge "narrow, painful," Old Norse angra "to grieve, vex, distress," Gothic aggwus "narrow."