The founder of psychoanalysis, Sigmund Freud, once claimed there had been three great scientific revolutions to have successively knocked humanity off its privileged, self-regarding perch at the centre of the universe. First, he said, came Nicolaus Copernicus, who showed that the earth was but a small, sun-orbiting speck amid an inconceivable vastness. Next was Darwin, who demonstrated that man wasn't God's privileged creation, but had descended from apes, "implying an ineradicable animal nature in him". Finally, trumpeted Freud, "Man's craving for grandiosity is now suffering the third and most bitter blow from present-day psychological research which is endeavouring to prove to the 'ego' of each one of us that he is not even master in his own house, but that he must remain content with the veriest scraps of information about what is going on unconsciously in his own mind."

If this all sounds like the ramblings of a man who's just hoofed an industrial-sized line of cocaine, then that's probably because psychoanalysis owes its emergence to Freud's protracted dabbling with the stuff, which back then was a freely available if expensive over-the-counter medicine. And not only did cocaine influence psychoanalysis – from the discovery of the "royal road to the unconscious" in dreams, and the therapy based on that, to the intellectual discipline itself – but Freud influenced the number of nostrils into which cocaine found its way. Indeed, according Dominic Streatfeild, author of Cocaine: An Unauthorised Biography, "If there is one person who can be held responsible for the emergence of cocaine as a recreational pharmaceutical, it was Freud."

While chewing coca leaves had been a staple of life in the Andes for several millennia, it didn't travel well, and was only first synthesised in 1855 by Freidrich Gaedcke, who named it "erythroxyline". By the mid-1880s it had acquired the less tongue-tripping name of "cocaine", as well as the refinement of its purification processes, and was being touted as a cure-all by the pharmaceutical companies manufacturing it. Freud learned of this new wonder drug from a journal called Therapeutic Gazette, which was owned by Parke-Davis, now a subsidiary of Pfizer, who ended up sponsoring the 28-year-old Freud to the tune of $24 to endorse their merch. Merck also sent samples to the ambitious young University of Vienna neuropathology research assistant. Suffice to say, he was an enthusiastic early adopter.

At this stage, Freud was sniffing around for the breakthrough that would make his name, having had a couple of minor successes with a method for staining nerve tissue and a paper theorising the possible location of eel's testicles. Coke would be his ticket to fame and fortune, he thought, providing a dusting of glamour and celebrity even in the fusty old world of academic medicine. He took delivery of his first batch, from Angel's Pharmacy, in April of 1884, and immediately began selflessly self-experimenting. All in the name of science.

Both the physical and psychical effects were instantly attractive, and in correspondence Freud described how he had started taking it "against depression and against indigestion, and with the most brilliant success" (also doubtless noting that the side-effects were more interesting than with Gaviscon). By the end of the year, he published a paper, "Über Coca", in which he describes "the most gorgeous excitement" upon first ingesting it, an "exhilaration and lasting euphoria", as well as noting the suppression of fatigue and hunger.

However, Freud may have been less on the nose when it came to cocaine's addictive properties and after-effects, writing: "It seems to me noteworthy – and I discovered this in myself and in other observers who were capable of judging such things – that a first dose or even repeated doses of coca produce no compulsive desire to use the stimulant further; on the contrary, one feels a certain unmotivated aversion to the substance" – all a far cry from the anguished 5AM plate-scraping and desperate, self-loathing text messages.

Perhaps the good doctor's imagined lack of dependency was simply because he never reached the bottom of his stash of freebies. Like fellow guinea pig, Bez, Freud must always have been one line ahead of the comedown. "If one works intensively while under the influence of coca, after from three to five hours there is a decline in the feeling of well-being, and a further dose of coca is necessary in order to ward off fatigue…"

WATCH: The Great Council House Scam – The Cocaine Dealer

Freud was soon sending samples to friends in the medical profession, citing its potential application as a mental stimulant, a treatment for asthma and eating disorders, an aphrodisiac (you have to wonder if Freud's celebrated interest in sexual fetishism was crystallised during a gak-fuelled four-hour masturbation marathon), and, alarmingly, as a cure for morphine and alcohol addiction. He introduced it to Ernst von Fleischl-Marxow, a physiologist friend who took morphine for the chronic pain he suffered in a thumb injured while dissecting a corpse. Rather than neutralising his addiction, it added another to the pot. Fleischl-Marxow was soon spending 6,000 marks a month on his habit, and was dead seven years later, aged 45.

A more successful medical application was discovered by an ophthalmologist friend, Karl Koller, the first to figure out that cocaine's numbing effects could be useful as a local anaesthetic in eye operations. Koller didn't acquire the same personal taste for the drug as Freud, however, which we know because an unused sample was found in 1995 among a collection of his papers housed in the Library of Congress reading room. Freud would surely have licked the baggie clean.

Such was the wide-eyed zeal with which Freud's professional colleagues were self-experimenting with the powdery panacea that things were bound to get a little hairy, the miracle-cure ideas a little far-fetched. Sure enough, Dr Wilhelm Fleiss – a German otolaryngologist (ear, nose and throat specialist) – published a paper entitled "The Relation between the Nose and the Female Sexual Organs", in which he speculated that the nose was a microcosm of the body, and any ailment could be treated by finding its corresponding location up the proverbial hooter and applying cocaine there, a theory Freud entertained so gamely that he would end up needing operations to unblock his nose, as would Fleiss.

It was while trying to treat a woman for hysteria – a neurosis then believed to emanate from the vagina – that Freud and Fleiss botched the operation and almost killed the patient later immortalised as "Irma" in The Interpretation of Dreams, where Freud glosses over an episode that today would have led to disgrace, a loss of his licence to practice, maybe even lawsuits and jail time.

Instead, Freud would elaborate the various theories forming the bedrock of psychoanalysis – concepts such as the id, ego and superego; libido as free-floating sexual energy; the Oedipus Complex – all the while doling out massive quantities of cocaine to middle-class Viennese neurotics who had come to chat to him, endlessly, about their problems, which always, thought Freud, turned out to be their parents and their own maladaptation to bourgeois norms (which were thereby left untouched, making psychoanalysis a capitalist discipline).

So it was that Gilles Deleuze and Félix Guattari's takedown of psychoanalysis, Anti-Oedipus, depicts three parts to Freud's career: "the exploratory, pioneering, revolutionary element" where the freeform desire of the libido was discovered; the classicist who then imposes Oedipal myth on that throbbing unconscious factory, trapping desire in the family; and finally the therapist who devised the "interminable talking cure". He was "a fantastic Christopher Columbus, a brilliant bourgeois reader of Goethe, Shakespeare and Sophocles, a masked Al Capone".

Little did Deleuze and Guattari know that a therapy replicating the structure of addiction – one based on the quintessential cokehead blahfest of meandering, self-absorbed monologues – was actually being fuelled by la coca loca. It was indeed a racket, although probably a bit more Pacino ( Scarface version) than Capone.

Despite its enduring popularity among those with the disposable income to burn on solipsistic chatter, today many consider psychoanalysis a discredited discipline, good for little more than in-jokes on Frasier. Its critics always thought it a pseudoscience (Freud himself hoped his Baroque theoretical constructs would later be proven by neuroscience), even before the founder's copious coke habit – which some classify as substance abuse rather than addiction – was brought to light. Skeptics point to the influence of cocaine on his masterwork, The Interpretation of Dreams, for which the model, it seemed, was the feverish, cocaine-induced, free-associative reverie. "I see myself as a snowman, with a carrot nose, stood in a vast field of pristine snow, all of which suddenly melts, as then do I, my nose falling off and leaving me with a feeling of profound emptiness…" "This is about fertility anxiety: the carrot is your penis…"

Freud's dalliance ended abruptly in 1896, the day after his father's funeral, having been 12 years a slave to the white lady. It's hard to believe he could have interpreted this as a mere coincidence, although it does make you wonder how European intellectual history might have panned out had Freud been heroically road-testing other now-banned recreational drugs.