late 14c., mesche, "open space in a net or netting," probably from late Old English max "net," earlier mæscre, from Proto-Germanic *mask- (source also of Old Norse möskvi, Danish maske, Swedish maska, Old Saxon masca, Middle Dutch maessce, Dutch maas "mesh," Old High German masca, German Masche "mesh"), from PIE *mezg- "to knit, plait, twist" (source also of Lithuanian mezgu, megzti "to knit," mazgas "knot"). In machinery, "the engagement of the teeth in gearing" (by 1875). Mesh-work in netting is attested by 1785.
1530s, originally in the figurative sense of "entangle, involve;" the literal transitive sense of "to catch in a net, entangle" is from 1540s; from mesh (n.). Literal sense "to become enmeshed" is from 1580s. Intransitive sense of "become engaged," as the teeth of one wheel with those of another, is by 1850. The figurative sense of "to fit in, combine" is by 1944. Related: Meshed; meshing.