c. 1600, "a dictionary, a word-book," from Middle French lexicon or directly from Modern Latin lexicon, from Greek lexikon (biblion) "word (book)," from neuter of lexikos "pertaining to words," from lexis "a word, a phrase; reason; way of speech, diction, style," from legein "to say," from PIE root *leg- (1) "to collect, gather," with derivatives meaning "to speak (to 'pick out words')."
Especially of dictionaries of Greek, Syriac, Hebrew, or Arabic, because these typically were written in Latin, and in Modern Latin lexicon (not dictionarius) was the preferred name for a word-book. The modern sense of "vocabulary proper to some sphere of activity" (1640s) is a figurative extension.