"to make a ditch," Old English dician "make a ditch, surround with a ditch or dike, enclose with a dike or ditches," from the source of dike (n.). Related: Diked; diking.
Old English dic "trench, ditch; an earthwork with a trench; moat, channel for water made by digging," from Proto-Germanic *dikaz (source also of Old Norse diki "ditch, fishpond," Old Frisian dik "dike, mound, dam," Middle Dutch dijc "mound, dam, pool," Dutch dijk "dam," German Deich "embankment"), from PIE root *dheigw- "to pierce; to fix, fasten." The sense evolution would be "to stick (a spade, etc.) in" the ground, thus, "to dig," thus "a hole or other product of digging."
This is the northern variant of the word that in the south of England yielded ditch (n.). At first "an excavation," later applied to the ridge or bank of earth thrown up in excavating a ditch or canal (late 15c.), a sense development paralleled by the cognate words in many languages, though naturally it occurred earlier in Dutch and Frisian. From 1630s specifically as "ridge or bank of earth to prevent lowlands from being flooded." In geology, "vertical fissure in rocks filled with later material which made its way in while molten" (1835).
c. 1300, mote "a mound, a hill" (a sense now obsolete); late 14c., "ditch or deep trench dug round the rampart of a castle or other fortified place," from Old French mote "mound, hillock, embankment; castle built on a hill" (12c.; Modern French motte) and directly from Medieval Latin mota "mound, fortified height," a word of unknown origin, perhaps from Gaulish mutt, mutta.
The sense shifted in Norman French from the castle mound to the ditch dug around it. For a similar evolution, compare ditch (n.) and dike. As a verb, "to surround with a moat," early 15c. Related: Moated.
"a trench made by digging," especially a trench for draining wet land," Middle English diche, from Old English dic "ditch, dike," a variant of dike (q.v.), which at first meant "an excavation," but later in Middle English was applied to the ridge or bank of earth thrown up in excavating. Middle English diche also could mean "a defensive wall."
As the earth dug out of the ground in making a trench is heaped up on the side, the ditch and the bank are constructed by the same act, and it is not surprising that the two should have been confounded under a common name. [Hensleigh Wedgwood, "A Dictionary of English Etymology," 1859]
Ditch-water "stale or stagnant water that collects in ditches" is from mid-14c. In Middle English, digne as dich water (late 14c.) meant "foolishly proud." Also see last-ditch.
c. 1200, diggen, "to make a ditch or other excavation," a word of uncertain origin, perhaps related to dike and ditch, either via Anglo-French diguer, from Old French digue "dike" (which is ultimately from Proto-Germanic *dīk-, from PIE root *dheigw- "to stick, fix") or directly from an unrecorded Old English verb. The older native words were deolfan (see delve), grafan (see grave (v.)).
Transitive meanings "form by excavation, make by digging," also "obtain or remove by excavation" are from late 14c.; figurative sense of "discover by effort or search" is from early 15c. Meaning "to penetrate" is from mid-15c.; transitive sense of "cause to penetrate, thrust or force in" is by 1885.
In 19c. U.S. student slang it meant "study hard, give much time to study" (1827); the 20c. slang sense of "understand" is recorded by 1934 in African-American vernacular. Both probably are based on the notion of "excavate." A slightly varied sense of "appreciate" emerged by 1939. The strong past participle dug appeared in 16c. but is not etymological.