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.