Corruption of agnail (literally “painful (anguished) nail”), by folk-etymological reanalysis as hang + nail; from Middle English agnail, from Old English angnæġl, from ang- (“tight/painful”) + næġl (“nail”). The first component, ang-, is cognate to anguish, anger, and angst, while næġl is the origin of nail.
Original sense of “loose strip of tissue”; the sense of “pointed corner of nail” is modern, and is connected with the reanalysis, due to stockings catching or “hanging” on the nail.
hangnail (plural hangnails)
- A loose, narrow strip of nail tissue protruding from the side edge and anchored near the base of a fingernail or toenail.
- A pointed upper corner of the toenail (often created by improperly trimming by rounding the corner) that, as the nail grows, presses into the flesh or protrudes so that it may catch (“hang”) on stockings or shoes.
Usage notes 
The modern sense of “sharp corner of nail” appears in promotional podiatry literature.