(verb) move to abd fro, especially with a quick, jerky motion
The original sense of wag was simply "move, be in motion", and this sense is found several times in Shakespeare, as when Titus says "the Empress never wags But in her company there is a Moor" (Titus Andronicus, V.ii.87).
It's also found when Hamlet says that he will fight with Laertes over Ophelia "until my eyelids will no longer wag" (Hamlet, V.i.263).
One of Shakespeare's uses has stayed as a modern idiom: Jaques' "how the world wags" (As You Like It, II.vii.23).
The word is also a favourite verb of the Host in The Merry Wives of Windsor, who uses it four times in the sense of "go off, depart": "Shall we wag?" (II.i.212), "Let us wag, then" (II.iii.88).
A rare use is Leonato's, in: "Bid sorrow wag, cry 'hem' when he should groan" (Much Ado About Nothing, V.i.16).