1520s, in now-obsolete sense "crooked, gnarled, rough," from extended sense of crab (n.1) + -y (2). Meaning "disagreeable, sour, peevish" is attested from 1776, American English. Both senses were found earlier in crabbed.[crabby etymology, crabby origin, 英语词源]