It was actually all a terrible mistake.
The "mummy" that was a principal ingredient in medieval and early modern medicines was indeed dried human flesh taken (at least in theory) directly from plundered Egyptian tombs, and it was a popular cure-all, supposedly effective against almost every ailment from headaches to bubonic plague. The best mummy had a ‘resinous, harden’d, black shining surface’, an acrid taste and a fragrant smell. When supplies from Egypt were hard to get, which they usually were, European bodies were substituted. It was important that the corpse from which the flesh was taken had not succumbed to disease, so though the very finest mummy was supposed to come from the remains of men suffocated in a Saharan sandstorm, in practice the principal source of the drug was the bodies of executed criminals.
That much is relatively well known, at least among historians of medicine. What is rather less understood is how belief in the efficacy of mummy first came about. But, as Sarah Bakewell points out, the original ‘mummy’ was a black, bituminous substance called mumia, which was thought to have healing properties and was popular in ancient Persia. The Greeks thought it was used by the Egyptians for embalming and slowly, over the centuries, the original meaning of the word was forgotten. Embalmed Egyptian bodies became known as ‘mummies’, and were associated with the alleged healing properties of mumia.
Sources
Sarah Bakewell, ‘Cooking with Mummy’, Fortean Times 124 (July 1999) pp.34-8
Laurence Brockliss and Colin Jones, The Medical World of Early Modern France (1997)
Harold Cook, The Decline of the Old Medical Regime in Stuart London (1986)