"medieval chemistry; the supposed science of transmutation of base metals into silver or gold" (involving also the quest for the universal solvent, quintessence, etc.), mid-14c., from Old French alchimie (14c.), alquemie (13c.), from Medieval Latin alkimia, from Arabic al-kimiya, from Greek khemeioa (found c.300 C.E. in a decree of Diocletian against "the old writings of the Egyptians"), all meaning "alchemy," and of uncertain origin.

Perhaps from an old name for Egypt (Khemia, literally "land of black earth," found in Plutarch), or from Greek khymatos "that which is poured out," from khein "to pour," from PIE root *gheu- "to pour" [Watkins, but Klein, citing W. Muss-Arnolt, calls this folk etymology]. The word seems to have elements of both origins.

Mahn ... concludes, after an elaborate investigation, that Gr. khymeia was probably the original, being first applied to pharmaceutical chemistry, which was chiefly concerned with juices or infusions of plants; that the pursuits of the Alexandrian alchemists were a subsequent development of chemical study, and that the notoriety of these may have caused the name of the art to be popularly associated with the ancient name of Egypt. [OED]

The al- is the Arabic definite article, "the." The art and the name were adopted by the Arabs from Alexandrians and entered Europe via Arabic Spain. Alchemy was the "chemistry" of the Middle Ages and early modern times, involving both occult and natural philosophy and practical chemistry and metallurgy. After c. 1600 the strictly scientific sense went with chemistry, and alchemy was left with the sense "pursuit of the transmutation of baser metals into gold, search for the universal solvent and the panacea."