1580s, "a horseman," especially if armed, from Italian cavalliere "mounted soldier, knight; gentleman serving as a lady's escort," from Late Latin caballarius "horseman," from Vulgar Latin *caballus, the common Vulgar Latin word for "horse" (and source of Italian cavallo, French cheval, Spanish caballo, Irish capall, Welsh ceffyl), displacing Latin equus (from PIE root *ekwo-).
In classical Latin caballus was "work horse, pack horse," sometimes, disdainfully, "hack, nag." This and Greek kaballion "workhorse," kaballes "nag" probably are loan-words, perhaps from an Anatolian language. The same source is thought to have yielded Old Church Slavonic kobyla.
The sense was extended in Elizabethan English to "a knight; a courtly gentleman," but also, pejoratively, "a swaggerer." Meaning "Royalist, adherent of Charles I" is from 1641.
"disdainful," by 1817, from earlier sense "easy, offhand" (1650s); originally "gallant, knightly, brave" (1640s), from cavalier (n.) in its Elizabethan senses. Related: Cavalierly.