Today's understanding of the significance of Karl Marx and Frederick Engels's work for the development of both ecological economics in particular and ecology in general has been hindered by persistent claims that Engels (and by imputation Marx) rejected the second law of thermodynamics. It is demonstrated here through textual analysis that Engels criticized not the entropy law itself but the extrapolation of this into the “heat death theory of the universe” hypothesis. The historical debate surrounding this hypothesis is examined, showing that Engels and Marx remained consistent with the natural science of their day. This opens the way to the recognition that Marx's political economy was unique in the 19th century in incorporating thermodynamics into the core of its analysis, thus providing the foundations for an ecological economics. The materialist-dialectical view of classical Marxism led to a dynamic, open, contingent approach to the earth system, reflecting a general evolutionary perspective.