I must declaim, at the budding phase of this article, that I'm an unabashed admirer of Marx's intellect and his oeuvre, though not of Marxism.
Eugenics vs. Class Consciousness:
Sir. Karl Popper, a great philosopher of science, once said, that the world was brought to the brink of destruction by two nations: USSR (Stalinism (Trotskyism & Leninism are still acceptable to many), based on the philosophy of Karl Marx) and Germany (Nazism, based principally on the philosophy of Friedrich Nietzsche (the author of 'Thus Spake Zarasthura' ) and these philosophies were inspired, principally, by Plato's 'The Republic', which extols the virtues of having a nation ruled by philosophers. From Sir Karl's statements arise a sense of abomination for a society where its members are classified into the various codified strata, the criterion/criteria for which is/are only agreed upon by some -- for others. For Sir. Karl, the idea of an individual’s right to life, and life itself, being pruned and preened by the authority was heart-rending. Surprisingly, Marx's most vociferous critic -- The Great John Maynard Keynes, was a proponent of eugenics.
However, Marx spoke and advocated 'Class Consciousness', which differs -- to a subtle (though I would say 'a large') extent -- from eugenics. I say this because if you follow Marx in his footsteps in his act of writing 'Das Kapital', many of his previous writings elucidate what 'Class Consciousness' would/should be about. I make an earnest attempt below to distil the subtle -- but important—difference/s between eugenics & 'Class Consciousness' from what I've read, and perceived.

Thus, what Marx mentions is that one must rise above one's apathy of the conditions, one is subjected to, to know one's real plight; and when this happens on a larger scale, the entire class of people -- in his writings 'the proletariat' -- would have realized their value in the society and would have, perhaps, gained the consciousness to govern themselves.
However, I must admit that in the days that followed Marx's death, people altered the term 'Class Consciousness' to mean 'Eugenics' -- in practice. Also, most nations which adopted & practised their flavour of socialism/communism have been parties to the most disreputable kind ‘big-brother’ tactics. I really wonder if Marx had envisioned a ‘North Korea’ kind of utopia; I wonder.
References:
1. The chapter on 'Dialectical Materialism' from Bertrand Russell's 'The Basic Writings of Bertrand Russell.'
2. Karl Marx's 'The Critique of Hegel's Philosophy Of Right.
3. Marx's Das Kapital - A Biography by Francis Wheen.
4. Marx: A Very Short Introduction by Peter Singer.
5. Karl Marx & Friedrich Engel's 'The Communist Manifesto.
This article is written by Abey Mathew. Follow him on Facebook here.