The inspiration for this question was my wondering specifically whether Sigmund Freud snorted cocaine when he famously experimented with the drug.
But it brings up the broader question: When and why did people begin snorting cocaine rather than administering it orally, intravenously, etc.? And how did that become the most popular (in media portrayals at least) route of administration?
Even more broadly, what's the history of people putting intoxicating substances up their noses?
I don't know when people started snorting cocaine. In the late 19th century, the drug would either be taken orally, or injected intravenously. Think Sherlock Holmes, with this famous scene from the Sign of Four:
Sherlock Holmes took his bottle from the corner of the mantel-piece and his hypodermic syringe from its neat morocco case. With his long, white, nervous fingers he adjusted the delicate needle, and rolled back his left shirt-cuff. For some little time his eyes rested thoughtfully upon the sinewy forearm and wrist all dotted and scarred with innumerable puncture-marks. Finally he thrust the sharp point home, pressed down the tiny piston, and sank back into the velvet-lined arm-chair with a long sigh of satisfaction.
This is the famous "seven percent solution," though a three percent solution became preferred as it was thought to have fewer side effects.
Sigmund Freud was one of cocaine's most ardent popularizers. Freud himself did not snort the drug, but rather drank it in a solution. Freud's famous essay is called Über Coca, and he's very explicit about how he took the drug. From section V (the Effect of Coca on the Healthy Human Body):
The first time I took 0.05cg. of cocaïnum muriaticum in a 1% water solution was when I was feeling slightly out of sorts from fatigue. This solution is rather viscous, somewhat opalescent, and has a strange aromatic smell. At first it has a bitter taste, which yields afterwards to a series of very pleasant aromatic flavors. Dry cocaine salt has the same smell and taste, but to a more concentrated degree.
He notes that later in the essay, higher concentrations cause some stomach upset, so he dissolved his cocaine in soda water.
I should not that experimenting with medications on yourself in this period was not unusual -- John Snow would regularly inhale his own anesthetics and mark their effects (which likely led to his early death), and to make another Holmes connection, Sir Arthur Conan Doyle's first academic publication was in the BMJ on self-poisoning with escalating doses of gelsemium.
Cocaine was purified in the 1850s, and in the first half century of its existence, there was considerable excitement about its effects (and lack of side effects). It was thought to be particularly useful to treat morphine addiction (think William Halstead, who basically switched from morphine to cocaine). Cocaine was found in a number of over-the-counter products, most notably coca cola.