early 14c., misterie, in a theological sense, "religious truth via divine revelation, hidden spiritual significance, mystical truth," from Anglo-French *misterie, Old French mistere "secret, mystery, hidden meaning" (Modern French mystère) and directly from Latin mysterium "secret rite, secret worship; a sacrament, a secret thing."
This is from Greek mystērion (usually in plural mysteria) "secret rite or doctrine (known and practiced by certain initiated persons only), consisting of purifications, sacrificial offerings, processions, songs, etc.," from mystēs "one who has been initiated," from myein "to close, shut" (see mute (adj.)); perhaps referring to the lips (in secrecy) or to the eyes (only initiates were allowed to see the sacred rites).
The Greek word was used in Septuagint for "secret counsel of God," translated in Vulgate as sacramentum. Non-theological use in English, "a hidden or secret thing; a fact, matter, etc., of which the meaning explanation, or cause is unknown," is from late 14c. In reference to the ancient rites of Greece, Egypt, etc. it is attested from 1640s. Meaning "detective story" is recorded by 1908. Mystery meat, slang for "unidentifiable meat served in a military mess, student dining hall, etc." is by 1949, probably from World War II armed services.
"handicraft, trade, art" (archaic), late 14c., misterie, from Medieval Latin misterium, alteration of Latin ministerium "service, occupation, office, ministry" (see ministry), influenced in form by Medieval Latin mysterium (see mystery (n.1)) and in sense by maistrie "mastery." Now perhaps only in mystery play, in reference to the medieval performances, if they often were, as is often said, staged by members of craft guilds. The two senses of mystery formed a common pun in (secular) Tudor theater.