structural:reformatting
Hegelianism and early journalism: 1836–1843

Spending summer and autumn 1836 in Trier, Marx became more serious about his studies and his life. He became engaged to Jenny von Westphalen, an educated member of the petty nobility who had known Marx since childhood. As she had broken off her engagement with a young aristocrat to be with Marx, their relationship was socially controversial owing to the differences between their religious and class origins, but Marx befriended her father Ludwig von Westphalen (a liberal aristocrat) and later dedicated his doctoral thesis to him. Seven years after their engagement, on 19 June 1843, they married in a Protestant church in Kreuznach.

In October 1836, Marx arrived in Berlin, matriculating in the university's faculty of law and renting a room in the Mittelstrasse. During the first term, Marx attended lectures of Eduard Gans (who represented the progressive Hegelian standpoint, elaborated on rational development in history by emphasising particularly its libertarian aspects, and the importance of social question) and of Karl von Savigny (who represented the Historical School of Law). Although studying law, he was fascinated by philosophy and looked for a way to combine the two, believing that "without philosophy nothing could be accomplished". Marx became interested in the recently deceased German philosopher Georg Wilhelm Friedrich Hegel, whose ideas were then widely debated among European philosophical circles. During a convalescence in Stralau, he joined the Doctor's Club (Doktorklub), a student group which discussed Hegelian ideas, and through them became involved with a group of radical thinkers known as the Young Hegelians in 1837. They gathered around Ludwig Feuerbach and Bruno Bauer, with Marx developing a particularly close friendship with Adolf Rutenberg. Like Marx, the Young Hegelians were critical of Hegel's metaphysical assumptions but adopted his dialectical method to criticise established society, politics and religion from a left-wing perspective. Marx's father died in May 1838, resulting in a diminished income for the family. Marx had been emotionally close to his father and treasured his memory after his death.

By 1837, Marx was writing both fiction and non-fiction, having completed a short novel, Scorpion and Felix; a drama, Oulanem; as well as a number of love poems dedicated to his wife. None of this early work was published during his lifetime. The love poems were published posthumously in the Collected Works of Karl Marx and Frederick Engels: Volume 1. Marx soon abandoned fiction for other pursuits, including the study of both English and Italian, art history and the translation of Latin classics. He began co-operating with Bruno Bauer on editing Hegel's Philosophy of Religion in 1840. Marx was also engaged in writing his doctoral thesis, The Difference Between the Democritean and Epicurean Philosophy of Nature, which he completed in 1841. It was described as "a daring and original piece of work in which Marx set out to show that theology must yield to the superior wisdom of philosophy". The essay was controversial, particularly among the conservative professors at the University of Berlin. Marx decided instead to submit his thesis to the more liberal University of Jena, whose faculty awarded him his Ph.D. in April 1841. As Marx and Bauer were both atheists, in March 1841 they began plans for a journal entitled Archiv des Atheismus (Atheistic Archives), but it never came to fruition. In July, Marx and Bauer took a trip to Bonn from Berlin. There they scandalised their class by getting drunk, laughing in church and galloping through the streets on donkeys.

Marx was considering an academic career, but this path was barred by the government's growing opposition to classical liberalism and the Young Hegelians. Marx moved to Cologne in 1842, where he became a journalist, writing for the radical newspaper Rheinische Zeitung (Rhineland News), expressing his early views on socialism and his developing interest in economics. Marx criticised right-wing European governments as well as figures in the liberal and socialist movements, whom he thought ineffective or counter-productive. The newspaper attracted the attention of the Prussian government censors, who checked every issue for seditious material before printing, which Marx lamented: "Our newspaper has to be presented to the police to be sniffed at, and if the police nose smells anything un-Christian or un-Prussian, the newspaper is not allowed to appear". After the Rheinische Zeitung published an article strongly criticising the Russian monarchy, Tsar Nicholas I requested it be banned and Prussia's government complied in 1843.