Marxism was born of a synthesis of the most advanced aspects of bourgeois social theory: English political economy, French socialism and German classical philosophy.
In retrospect the first two elements of this seem obvious enough.
Among the political economists, Adam Smith had shown that labour was the essence of value, while David Ricardo, despite being on the opposite side of the barricades, had pointed to the rationality of working class struggle.
Meanwhile, the socialist workers who Karl Marx met in Paris were living proof of an alternative to the egoistic individualism assumed to be natural by the economists.
Their practice showed class struggle need not simply be a negative reaction against exploitation but could act as the embryo of a positive socialist alternative to capitalism. If the relevance of German classical philosophy to the socialist movement is less obvious, Engels claimed that the latter was the direct "heir" of the former.
Writing in a context dominated by the French Revolution, the two giants of classical German philosophy, Immanuel Kant and GWF Hegel, shared with the revolutionaries the idea that freedom was the human essence. However, while they both embraced politics that aimed at realising human freedom, each favoured the idea of reform from above over revolution from below.
Moreover, while Kant's vision of individual autonomy could act as a spur to a radical critique of absolutism his liberal followers tended to become more conservative after the triumph of bourgeois individualism. Although Hegel was nominally the more conservative of the two thinkers his theory lent itself to a much more radical interpretation.
Hegel argued that while freedom was the universal human essence, because it was realised in definite social and cultural contexts it always took a specific historical form. The revolutionary implications of this idea are not difficult to imagine: as history progressed the concrete possibility of freedom would change in ways that tended to undermine old orders. Nevertheless, Hegel suggested that history had ended in 19th century Prussia!
The contradiction between these two aspects of his thought was reflected in his infamous claim that "all that is real is rational; and all that is rational is real". If this statement reads like an apology for the status quo, because Hegel distinguished between what is real and what actually exists, it could also be squared with a commitment to reform - institutions which had been rational in the past could become irrational over time.
So long as Prussia was moving in a reformist direction this tension between what Engels called Hegel's conservative system and his revolutionary method could be reconciled. However, once reaction moved to the fore the contradictions at the core of Hegelianism caused a split among his followers.
This split was first signalled by David Strauss's Life of Jesus (1835). Whereas Hegel had largely bypassed discussion of the Gospels in his attempt to reconcile his system to the Protestantism of the Prussian state - thus opening the door to Hegelianism becoming essentially a state-sanctioned philosophy in the 1820s - Strauss's devastating (Hegelian) critique of the Gospels exposed the limits of this link. From then on right wing (old) Hegelians defended Hegel's conservative system against left wing Young Hegelians who explored the revolutionary implications of his method.
While Strauss criticised the historical accuracy of the gospels, and thus the biblical fundamentalism of Prussia's Lutheran elite, he nevertheless defended the myths of Christianity as a reflection of the needs of both early and modern Christian communities. Bruno Bauer pressed the revolutionary side of the Hegelian method further to claim that though Christianity had reflected the needs of the early Christian communities, because it had long since ceased to do so the focus of radical politics should be a critique of religion.
Young Hegelian radicalism also found a voice in Ludwig Feuerbach's claim that the Christian idea of god was best understood as a distorted image of our collective humanity, a claim which Feuerbach's followers extended to argue for an abstract, "true socialism", disconnected from any class agency. Alternatively, Max Stirner staked out an anarchist critique of all religious and political systems including socialism. These, he insisted, should be opposed because they led to the authoritarian suppression of the individual ego.
Whatever the substantive differences among the Young Hegelians, they agreed that radical ideas were key to changing the world. This diverged from Hegel's insistence that any social transformation must be rooted in underlying changes in the way people lived.
From this perspective it was as absurd to try to extend freedom beyond the limits of bourgeois egoism by abstract moral injunctions as it was to hope that lions might lie down with lambs. Rather, the expansion of freedom was dependent upon the prior emergence of forms of practice pointing to different ways of life.
Ironically, this Hegelian thesis informed Marx's break with the Young Hegelians. Opening with a criticism of their abstract politics his argument culminated in the claim that the emergent workers' movement, dismissed by them as irrelevant, pointed to a real deepening of the idea of freedom.
He suggested that, for workers, socialism was not a good (Feuerbach) or bad (Stirner) moral doctrine, but was the ideological moment of an emerging way of life within which solidarity came to be desired because it had become a real need.
From this standpoint neither biblical fundamentalism (Strauss) nor religion more generally (Bauer) were key social problems. Rather they were symptoms of deeper issues, and Marx insisted that the struggle for freedom should shift its focus to these causes.
Thus, against the pseudo-revolutionary posturing of the Young Hegelians, he argued that in the modern world a really revolutionary ideology is one which reflects and speaks to the actual movement of workers for freedom.