1729, "jester, merry fellow, one who jokes," agent noun from joke (v.). In generic slang use for "any man, fellow, chap" by 1811, which probably is the source of the meaning "odd face card in the deck" (1868), also often jolly joker. An 1857 edition of Hoyle's "Games" lists a card game called Black Joke in which all face cards were called jokers.
American manufacturers of playing-cards are wont to include a blank card at the top of the pack; and it is, alas! true that some thrifty person suggested that the card should not be wasted. This was the origin of the joker. ["St. James's Gazette," 1894]
1540s, "type of pantomime dance;" 1580s, "professional comic fool;" 1590s in the general sense "a clown, a joker;" from French bouffon (16c.), from Italian buffone "jester," from buffa "joke, jest, pleasantry," from buffare "to puff out the cheeks," a comic gesture, of echoic origin. Also see -oon.
also scallawag, "disreputable fellow," by 1839, American English colloquial, of uncertain origin; perhaps an alteration (by influence of wag "habitual joker") of Scottish scallag "farm servant, rustic," itself an alteration of Scalloway, one of the Shetland Islands, the reference being to little Shetland ponies (an early recorded sense of scalawag was "undersized, ill-fed, or worthless animal," 1854).
Judge Lynch passed through town on Saturday night last. He remained here long enough to give a worthless scalawag a genteel suit, from "head to heels" of tar and feathers. [Maumee City Express, Saturday Aug. 3, 1839]
In U.S. history, used from 1862 as a derogatory term for anti-Confederate native white Southerners.
The word was used in the southern United States, during the period of reconstruction (1865 to 1870 and later), in an almost specific sense, being opprobriously applied by the opponents of the Republican party to native Southerners who acted with that party, as distinguished from carpet-bagger, a Republican of Northern origin. [Century Dictionary]