late 14c., "impudent, shameless, presumptuous," from Old French mal apert "over-ready, impudent," literally "ill-skilled," from mal "badly" (see mal-) + apert "skillful," variant of espert "experienced, skillful, clever" (from Latin expertus; see expert (adj.)). Attested from c. 1300 as the name of the personification of impudence. From mid-15c. as an adverb, "impudently, presumptuously." Related: Malapertly; malapertness.
c. 1500, "resembling sauce" (a sense now obsolete), later, of persons, words, etc., "impertinent in speech or conduct, flippantly bold, cheeky" (1520s), from sauce (n.) + -y (2). The connecting notion is sauce in the figurative sense of "that which adds intensity, piquancy in words or actions."
Compare Skelton's have eaten sauce for "be abusive." Also compare sauce malapert "impertinence" (1520s), and sauce (n.) in its obsolete use as a vocative for "impudent person" (1530s). In Shakespeare, with overtones of "wanton, lascivious," it was "a term of serious condemnation" [OED]. Also compare salty in similar senses.