"It is absolutely essential that you get out of boring Brussels for once and come to Paris, and I for my part have a great desire to go carousing with you," Friedrich Engels wrote to Karl Marx in 1846. "If I had an income of 5000 francs I would do nothing but work and amuse myself with women until I went to pieces. If there were no Frenchwomen, life wouldn't be worth living. But so long as there are grisettes [prostitutes], well and good!"

The life of Friedrich Engels, the mill-owning Marxist, was one of supreme self-contradiction - particularly when it came to feminism. He was a socialist who condemned the use of prostitutes as "the most tangible exploitation - one directly attacking the physical body - of the proletariat by the bourgeoisie", but then regularly enjoyed their services. He demanded female equality, but couldn't bear the company of high-minded women. Engels was the intellectual architect of socialist feminism, and an old-fashioned sexist.

In today's public culture, when the personal is forever political, we seem to find it impossible to disassociate such personal exposés from the philosophical legacy. But in doing so, we risk dismissing in Engels one of the most creative modern thinkers on gender and the family.

Engels' relevance rests on a now little-read tract from the 1880s, The Origin of the Family, Private Property and the State. Its controversial starting point was that the female act of reproduction should be regarded as of equal worth as the production of the means of existence, of which there were few higher human callings in Marx and Engels' materialist template. With that stroke, the role and function of women in Marxist society was understood as something more profound.

This elevation of womanhood formed, in turn, part of a broader attempt by Engels to trace the rise and fall of female power within western society. Following years of immersion in anthropology and ancient history, Engels concluded that in primeval societies the habits of kinship, common marriage and promiscuity meant that a child's lineage could only be established with any certainty along the matrilineal line. As a result, women were treated with a high degree of respect and enjoyed much greater social authority.

But the family structure changed dramatically down the centuries. As the stages of production evolved from savagery to barbarism to civilization, so the family developed from extended, "consanguine" forms down to the husband, wife and two kids model. In the 19th century, what underpinned the family was the capitalist mode of production that, in turn, signalled the death knell for women's rights.

With the arrival of private property came systems of inheritance. To pass property on to their biological offspring, fathers now demanded that paternity be established beyond doubt and, as a result, imposed strict limitations on female autonomy. Capitalism ushered in "the world historical defeat of the female sex. The man took command in the home also, the woman was degraded and reduced to servitude; she became the slave of his lust and a mere instrument for breeding children."

All of which meant sexism was a historical and sociological construct. In primitive communist societies, Engels suggested, women were "free and honourable". But following the disintegration of such societies, women started to become more oppressed. What this history of discrimination proved was that there was nothing immutable about male chauvinism: inequality was the product of specific economic systems, rather than biological fact.

And Engels witnessed the effects of such inequality all around him. Mid-Victorian culture had made a fetish of the nuclear family form - symbolised most readily in the irredeemably middle-class monarchy of Victoria and Albert. "On what foundation is the present family, the bourgeois family, based?" Marx and Engels had first asked in The Communist Manifesto. "On capital, on private gain. In its completely developed form, this family exists only among the bourgeoisie. But this state of things finds its complement in the practical absence of the family among the proletarians, and in public prostitution."

For beneath the covered table legs, there festered hypocrisy. "All that this Protestant monogamy achieves is a conjugal partnership of leaden boredom, known as 'domestic bliss'." The bourgeois wife "differs from the ordinary courtesan in that she does not let out her body on a piecework as a wage worker, but sells it once and for all into slavery."

But come the revolution, things would be different. Once inheritable wealth was turned back into a shared pool of social property then the narrow, economic foundations of the restrictive "pairing" family would disintegrate. "True equality between men and women can become a reality only when the exploitation of both by capital has been abolished," Engels explained. With the elimination of private property, men and women could marry for "mutual affection", not money; people could change partners at will and avoid "the useless mire of divorce proceedings"; and communal systems of child-rearing would indoctrinate the next generation. The "family" would evolve to a post-capitalist state of sexual and familial communism remarkably like its primitive forebears.

In the 1920s, Anatoli Lunacharski, the Soviet commissar of education, attempted to put a vulgarised version of Engels' thinking into practice. "Our problem now is to do away with the household and to free women from the care of children," he expounded. And there was a concerted attempt by many communist states during the 20th century to confront the economic underpinnings of inequality by bringing women into the labour force, socialising the family unit and ensuring equal access to education. Nowhere more so than in China, where "the face of Engels," as one sociologist in the 1980s put it, "is familiar to every Chinese citizen." From its inception, the People's Republic of China theoretically committed itself to improving the economic rights of women.

In the west, Engels has inspired numerous feminist socialists. Kate Millett recorded in her 1970 book, Sexual Politics, how Engels' treatment of marriage and the family as historical institutions, "subject to the same processes of evolution as other social phenomena ... laid the sacred open to serious criticism, analysis, even to possible drastic reorganisation ... The radical outcome of Engels' analysis is that the family, as that term is presently understood, must go."

If truth be told, Engels would have found the company of Millett hard to bear.

He had no time for the views of "affected, 'eddicated'" ladies, be they the theosophist Annie Besant or the women's rights campaigner Gertrud Guillaume-Schack.

And as for "these little madams, who clamour for women's rights", Engels regarded the campaign for female suffrage as a distinctly middle-class distraction.

His lifetime partners were two illiterate sisters - first Mary, then Lizzy Burns - of "genuine Irish proletarian blood", who he might have picked up from his father's mill. Engels had once condemned the tendency of mill owners to take advantage of female hands; here, he did just that. And alongside the Burns sisters were a series of French mistresses, affairs and even an allegation of rape (furiously denied by Engels).

He cared for both Mary and Lizzy in their dying days - even marrying the latter on her deathbed, granting an Irish Catholic's last wish despite his ideological aversion to the "bourgeois hypocrisy of marriage". He supported female friends going through divorce proceedings and even voted for female candidates in school board elections as "the ladies here are notable for the fact that they do very little talking and a great deal of working - as much on average as three men".

Few great thinkers are able to live out their ideals, and Engels was more contradictory than most. But the personal is not always political; philosophy exists beyond the person. And if much of Engels' life no longer appears very enlightened, in an era when part-time male workers earn some 36% more than their female equivalents and one third of British women in work take home less than £100 per week, his insights into the economic foundations of sexual inequality seem as relevant as ever.

• The Frock-coated Communist: The Revolutionary Life of Friedrich Engels by Tristram Hunt is published by Allen Lane, priced £25. To order a copy for £23 with free UK p&p, go to theguardian.com/bookshop or call 0330 333 6846.