Middle English leued, from Old English læwede "nonclerical, unlearned," of uncertain origin but according to OED probably ultimately from Vulgar Latin *laigo-, from Late Latin laicus "belonging to the people" (see lay (adj.)).
Sense of "unlettered, uneducated" (early 13c.) descended to "coarse, vile, lustful" by late 14c. In Middle English often paired alliteratively with learned. It also was a noun in Old English, "layman;" for nouns, Elizabethan English made lewdster, lewdsby. Related: Lewdly; lewdness.