n his "Contribution to the Critique of Hegel’s Philosophy of Right" (1843) and, more explicitly, in its Introduction (published in 1844), Karl Marx argues that rights do not come from abstract ideas, God, nature, or reason (as claimed by philosophers like Hegel, Locke, or Rousseau). Instead, he posits a materialist and social origin:
Rights arise from the material conditions and social relations of a given society, and they primarily serve to protect the interests of the dominant economic class.
Marx's primary target is Hegel's idealist doctrine that the state (and its laws and rights) is the manifestation of rational ethical life (Sittlichkeit) and the highest expression of freedom.
Inversion of Hegel: Marx performs a "materialist inversion" of Hegel. For Hegel, the Idea (or Reason) develops and manifests itself in the family, civil society (the realm of economics), and finally the state. The state is the culmination and purpose of this development.
Marx's View: Marx argues that Hegel has it backwards. The state and its legal concepts (like rights) do not determine the structure of civil society; instead, the material realities of civil society—the economic relationships, the class structure, and the system of private property—give rise to and determine the form of the state and its laws.
To put it succinctly, in the Critique of Hegel's Philosophy of Right, Marx argues rights come from:
The Material Base: The economic structure of society (e.g., capitalist private property) is the real foundation.
Social Relations: The relationships between classes (bourgeoisie vs. proletariat, lords vs. serfs) determine what needs to be legally protected.
Class Struggle: The specific form of rights is an outcome of historical class conflict. Bourgeois rights were the winning demands of the revolutionary bourgeoisie against the aristocracy.
The Ruling Class: The state, which enforces rights, is not neutral but is shaped by and serves the interests of the economically dominant class.
In essence, Marx dismantles the philosophical justification for rights and reveals them as historical, social, and class-based constructs, not eternal, natural, or purely rational truths. This critique is the foundation for his later, more developed historical materialist theory in works like The German Ideology and Capital.
https://www.marxists.org/archive/marx/works/1843/critique-hpr/intro.htm