By 1882, Freud had a medical degree in hand and some hard choices to make. His prospects in Ernst Brücke's lab were not good: although the quality of Freud's research had been above reproach, there were two other assistants in the lab who had seniority and would receive promotions long before Freud. Even if he eventually received a promotion, science was not a particularly lucrative career path.
Freud desperately wanted to marry his fiancé, Martha Bernays, who was still in Hamburg with her family. He needed money first, however. Marrying meant supporting himself, Martha, and the children that would almost certainly follow soon after their marriage. Freud's father was in no position to help the young couple–he'd had enough trouble supporting his own family, and funding Freud was out of the question. Indeed, as the years went by, Freud would increasingly be the sole supporter not only of the family he was to build with Martha, but also of his aging parents and, until they were married, his younger sisters. Freud was torn between his passion for research and for Martha. If he carried on with the research he loved, he would never make enough money to marry the woman he loved. In 1882, Brücke helped Freud decide, telling him that his prospects for promotion within the lab were poor, despite his good work, and that private practice as a physician was his most profitable alternative.
Freud began work at the Vienna General Hospital almost immediately. His plan was to gain the experience in treating actual patients that eight years of medical school had not given him, but that he would need in order to start a successful private practice. He started in an entry-level position, moving rapidly through the surgery and dermatology departments, and arriving finally in Theodor Meynert's department of psychiatry. While there, he continued to do research on neurophysiology.
One of Freud's most promising areas of research, which he conducted on his own time, had to do with a drug that had only recently been made available in Europe: cocaine. Although the effects of the coca plant had been known for quite some time, it was only in the 1880s that refined cocaine–the active ingredient in the coca leaf–became widely available in Europe. Freud was one of the first researchers to attempt a systematic exploration of its effects on the mind and body. The results of his earliest experiments–mostly introspective reports of cocaine's effects on his own mood, wakefulness, and somatic symptoms–were published in July of 1884 in a paper called "Über Coca" ("On Coca"). His generally assessment of the drug was extremely optimistic: he claimed that it might be useful not only in treating low mood but also in treating morphine addiction.
What Freud failed to emphasize sufficiently, however, was the anesthetic effect of cocaine on mucous membranes such as the nose and mouth. A colleague of his, Dr. Kohler, performed experiments while Freud was visiting his fiancé that showed that cocaine could be used to anesthetize the eye for the purposes of eye surgery. Since there was no other effective way to do this at the time, Kohler's discovery was a major one, and Freud deeply regretted not making the discovery himself.
After this disappointment, Freud continued his research with cocaine, eventually publishing two more papers. The first one was slightly more subdued in its praise than "Über Coca" had been, and the third one was even more skeptical. Freud frequently used cocaine himself to deal with minor aches and pains, and he recommended it enthusiastically to friends and acquaintances, even going sending Martha Bernays samples of the drug for her own use. His enthusiasm for cocaine was sharply curtailed, however, by an ugly incident in 1885 in which he tried to treat a friend's morphine addiction by giving him cocaine. The friend, Ernst von Fleischl-Marxow, who had been one of Brücke's assistants while Freud was working in Brücke's laboratory, gave up his morphine addiction immediately and replaced it with a voracious appetite for cocaine that contributed to his death in 1891. The episode affected Freud deeply and soured him permanently on cocaine. Nonetheless, it appears from his correspondence with Wilhelm Fliess that Freud used cocaine occasionally, and sometimes heavily, through the mid-90s. After that time, however, he seems to have stopped using it entirely.