Prosecutors say Craig Dimelow was in possession of Class A drugs with the intent to supply.
Dimelow, from Livingston, was charged under the Misuse of Drugs Act 1971 S4 (3) (B) and made no plea. The case was continued for further examination.
The 28-year-old was released on bail following a brief appearance from custody in private on petition at Edinburgh Sheriff Court and is expected to return at a later date.
Police Scotland said officers recovered more than £1 million worth of heroin from a property at Captain’s Drive on November 21.
They also found a large amount of cutting agent and around £11,000 in cash later that day during a search of an address in Leving Place, Livingston.
Detective Inspector Dougie Telfer, of Police Scotland, said: “Once again, the vital assistance of the public has resulted in another significant drugs recovery, this time ensuring that £1.1 million worth of heroin was seized before it could be sold within our communities.
“Tackling organised crime remains one of Police Scotland’s top priorities.”
Join our Facebook group Our Edinburgh to share images and news from and around the Capital