early 15c., "moonlight, the shining of the moon," from moon (n.) + shine (n.). Similar formation in Dutch maneschijn, German Mondschein, Swedish månsken, Danish maaneskin. In a figurative use, "appearance without substance, pretense, fiction" from late 15c.; perhaps from the notion of "moonshine in water" (see moonraker) or "light without heat."
Meaning "illicit or smuggled liquor" is attested from 1785 (earliest reference is to that smuggled on the coasts of Kent and Sussex; in reference to Southern U.S., by 1829), from the notion of being brought in or taken out under cover of darkness at night. Moonlight also occasionally was used in this sense early 19c. As a verb in this sense from 1883. Related: Moonshiner "smuggler; one who pursues a dangerous or illegal trade at night" (1860).