Old English swingan "beat, strike; scourge, flog; to rush, fling oneself" (strong verb, past tense swang, past participle swungen), from Proto-Germanic *swengwanan (source also of Old Saxon, Old High German swingan, Old Frisian swinga, German schwingen "to swing, swingle, oscillate"), which is of uncertain origin and might be Germanic only.
The meaning "move freely back and forth" is first recorded 1540s. Transitive sense "cause to oscillate" is from 1550s. Sense of "bring about, make happen" is from 1934. Sense of "engage in promiscuous sex" is from 1964; earlier, more generally, "enjoy oneself unconventionally" (1957). Related: Swung; swinging. Swing-voter "independent who often determines the outcome of an election" is from 1966.