I got curious this week about the origin of the word mystery. It turns out it's a lot older than I expected, and at the same time a lot more recent. Depending on how you look at it, it's more than 2000 years old, or less than 100.
According to the Oxford English Dictionary, the Latin word mysterium had a solely theological meaning in the Classical world. It's then found in early Christian texts as early as the 4th century. The first known use of the word used with a secular meaning is in a 14th century bible: ca. 1384, Bible (Wycliffite, E.V.) (Douce 369(2)) Dan. ii. 27 "And Danyel answerde byfore the kyng, and saith, 'The mysterie whiche the kyng axith, the wise men and the witchis and dyuynours..mown not shewe to the kyng.'"
Jump 250 years and we've got a meaning closer to the word we use in this blog: "In weakened use (chiefly ironic or humorous): a puzzle, a conundrum." The example the OED gives for this general usage is "[blank] is a mystery to me," and the first known use is from 1629: "J. Ford Lovers Melancholy iv. i. 64 Aret.: What should this young man bee, Or whither can he be conuay'd? Sophr.: Tis to me a mystery, I vnderstand it not." (Why the u in understand is a v in this example, but not the u in young, is a mystery to me; I understand it not.)
It's not until much later that we have a documented use of the word as a kind of fiction. The OED's earliest example comes from none other than Raymond Chandler, in a letter he wrote in December of 1949: "The mystery and 'tec are on the wane." (You can see the whole letter in context here -- he also thinks that science fiction is a flash in the pan!) The next use in the OED is from the New Yorker in 1969: "Linda was on the next bed, reading her mystery." (Turns out this is John Updike, though the OED doesn't say so. See it in context here.)