"to defecate," 1846, from a cluster of older nouns, now dialectal or obsolete, applied to things cast off or discarded (such as "weeds growing among corn" (early 15c.), "residue from renderings" (late 15c.), underworld slang for "money" (18c.), and in Shropshire, "dregs of beer or ale"), all probably from Middle English crappe "grain that was trodden underfoot in a barn, chaff" (mid-15c.), from French crape "siftings," from Old French crappe, from Medieval Latin crappa, crapinum "chaff." Related: Crapped; crapping.
For connection of the idea of defecation with that of shedding or casting off from the body, compare shit (v.). Despite the etymological legend, the word is not from the name of Thomas Crapper (1837-1910) who was, however, a busy plumber and may have had some minor role in the development of modern toilets. The name Crapper is a northern form of Cropper (attested from 1221), an occupational surname, obviously, but the exact reference is unclear. Crap (v.) as a variant of crop (v.) was noted early 19c, as a peculiarity of speech in Scotland and what was then the U.S. Southwest (Arkansas, etc.).
Draw out yere sword, thou vile South'ron!
Red wat wi' blude o' my kin!
That sword it crapped the bonniest flower
E'er lifted its head to the sun!
[Allan Cunningham (1784-1842), "The Young Maxwell"]