Answer: Cocaine poisoning.
Step 1: Magnan's symptom, also called the cocaine bug, is a tactile hallucination (formication) seen in chronic cocaine use. The person feels as if grains of sand or small insects are moving under the skin.
Step 2: This itching sensation leads to scratching, excoriations and ulcers as the patient tries to remove the imaginary bugs.
Step 3: Chronic cocaine use can also cause CNS degeneration with hallucinations, convulsions, delirium and insanity. The sign is classically linked to cocaine, not cannabis, opium or alcohol.
Ref: The Essentials of Forensic Medicine and Toxicology, K.S. Narayan Reddy, 33rd edition, pg 603.