Green’s Dictionary of Slang

cut the rug v.

also beat the rug, cut a rug, cut rug

[1920s+] to dance (cf. rug cut v.); thus rug-cutting n., dancing.