Old English dic "trench, ditch; an earthwork with a trench; moat," from Proto-Germanic *dik- (cognates: Old Norse diki "ditch, fishpond," Old Frisian dik "mound, dam," Middle Dutch dijc "mound, dam, pool," Dutch dijk "dam," German Deich "embankment"), from PIE root *dhigw- "to pierce; to fix, fasten" (cognates: Sanskrit dehi- "wall," Old Persian dida "wall, stronghold, fortress," Persian diz).
At first "an excavation," later (late 15c.) applied to the resulting earth mound; a sense development paralleled by cognate forms in many other languages. This is the northern variant of the word that in the south of England yielded ditch (n.).