there is usually the distinction between the younger Marx and the mature Marx; the younger Marx wrote a lot about the quest for freedom as the driving force of history - freedom had a big role in his critique of capitalism as the source of alienation (to simplify the argument: the capitalist production process forces us into a small part of the big assembly line process so that we do not see the actual contribution of our work into the end result - as a result we don't quite care and become estranged from the result - and we also don't see much of the profit, Marx argued that only a socialist system will be able to make the individual free as a prerequisite for overcoming alienation)
The mature Marx was more into political economy - and was explaining everything in terms of economic necessity, and this line of argument often comes into contradiction with the quest for freedom. This change came gradually after the failure of the 1848 revolutions throughout Europe.