Just as Cuffee (or Cuffy), back in the days of slavery, was the name often given by Blacks to a boy born on Friday, so Juba was the name of African origin frequently given to girls born on Monday (see Hennig Cohen in American Speech, XXVII, 103-04).
But, unlike the white child born on Monday who, in the old folk rhyme, is “fair of face,” the black girl child was, presumably, a natural-born imp of perversity and had, repeatedly, to be switched.
Thus, “to dance Juba,” which, in the early days of minstrel shows of the 1830’s, meant to dance in a rollicking manner with hands, feet, and head all in motion, appears to have had its start in the animated dancing performed involuntarily by a child being switched in punishment for some kind of naughtiness of deviltry.
Such, at least, is the interpretation of Dr. Mitford M. Mathews (in American Speech XXVIII, 206), speaking from personal experience of his boyhood in Alabama about 1900.