In this article, the optimal control of a cooling line for production of dual phase steel in a hot rolling process is discussed. In order to achieve a desired dual phase steel microstructure an optimal cooling strategy has to be found. The cooling strategy should be such that a desired final distribution of ferrite in the steel slab is reached most accurately. This problem has been solved by means of mathematical control theory. The results of the optimal control of the cooling line have been verified in hot rolling experiments at the pilot hot rolling mill at the Institute for Metal Forming (IMF), TU Bergakademie Freiberg.