Initially, Jung had aspirations of becoming a preacher or minister in his early life. There was a strong moral sense in his household and several of his family members were clergymen as well. For a time, Jung had wanted to study archaeology, but his family could not afford to send him further than the University of Basel, which did not teach archaeology. After studying philosophy in his teens, Jung decided against the path of religious traditionalism and decided instead to pursue psychiatry and medicine.[ His interest was immediately captured—it combined the biological and the spiritual, exactly what he was searching for. In 1895 Jung began to study medicine at the University of Basel. Barely a year later in 1896, his father Paul died and left the family near destitute. They were helped out by relatives who also contributed to Jung's studies. During his student days, he entertained his contemporaries with the family legend, that his paternal grandfather was the illegitimate son of Goethe and his German great-grandmother, Sophie Ziegler. In later life, he pulled back from this tale, saying only that Sophie was a friend of Goethe's niece.
In 1900, Jung moved to Zürich and began working at the Burghölzli psychiatric hospital under Eugen Bleuler. Bleuler was already in communication with the Austrian neurologist Sigmund Freud. Jung's dissertation, published in 1903, was titled On the Psychology and Pathology of So-Called Occult Phenomena. In 1905 Jung was appointed as a permanent 'senior' doctor at the hospital and also became a lecturer Privatdozent in the medical faculty of Zurich University. In 1906 he published Diagnostic Association Studies, which Freud obtained a copy of. In 1909, Jung left the psychiatric hospital and began a private practice in his home in Küsnacht.
Eventually a close friendship and a strong professional association developed between the elder Freud and Jung, which left a sizeable correspondence. For six years they cooperated in their work. In 1912, however, Jung published Psychology of the Unconscious, which made manifest the developing theoretical divergence between the two. Consequently, their personal and professional relationship fractured—each stating that the other was unable to admit he could possibly be wrong. After the culminating break in 1913, Jung went through a difficult and pivotal psychological transformation, exacerbated by the outbreak of the First World War. Henri Ellenberger called Jung's intense experience a "creative illness" and compared it favourably to Freud's own period of what he called neurasthenia and hysteria.