"to move to and fro" (especially in an effort to avoid something), 1560s, origin and sense evolution obscure, perhaps akin to Scottish dodd "to jog." Common from early 18c. in figurative sense of "to swindle, to play shifting tricks." Related: Dodged; dodging.
"person's way of making a living," 1842, slang, from dodge (v.).