Hartmann grew up in Tübingen. In 1981, he worked in the Tel Joseph kibbutz in Israel. Following his compulsory military service, he studied history, German and sport at the universities of Tübingen, Cologne and Freiburg. He completed his university studies in 1986 with the First State Exam for grammar school teaching. In 1989, he completed his PhD in Cologne with a thesis on General Franz Halder, chief of the General Staff of the German Army, 1938–1942. His doctoral supervisor was Andreas Hillgruber. From 1990 to 1991, Hartmann worked as a consultant at the Political Archives of the German Foreign Office in Bonn, where he was a member of the international historical commission on the Akten zur deutschen auswärtigen Politik 1918–1945. In 1992, he was seconded for a year to the Brandenburg Ministry of Science, Research and Culture in Potsdam, where he worked as a consultant. Since 1993, Hartmann has been research fellow at the Institute of Contemporary History in Munich/Berlin, where he was, among other functions, deputy editor-in-chief of the journal Vierteljahrshefte für Zeitgeschichte from 1998 to 2012 and director of the research project 'Wehrmacht in der nationalsozialistischen Diktatur 1933–1945’ from 1999 to 2009, from which his study Wehrmacht im Ostkrieg also emerged and which was concluded with the edited collection Der deutsche Krieg im Osten 1941–1944. From March 2012 to May 2015, Hartmann was project supervisor of the critical edition of Adolf Hitler’s work Mein Kampf. From 2004 to 2009, Hartmann was furthermore visiting lecturer at the University of the Bundeswehr in Munich. As a lieutenant colonel of the reserve, he is currently lecturer at the Military Academy of the Bundeswehr in Hamburg. In 2016/17, he was deployed in Mali as Strategic Advisor for the European Union Training Mission. In addition, Hartmann often advises historical films and documentaries, including War of the Century, Enemy at the Gates, Der Untergang, Sophie Scholl – Die letzten Tage, Napola – Elite für den Führer, Tagebuch eines Lagerkommandanten, Unsere Mütter, unsere Väter and The Book Thief. He is furthermore on the academic advisory board of the television channel History. His academic focal points are military history, the history of international relations, German history and European history.
Akten zur Deutschen Auswärtigen Politik 1918–1945. Aus dem Archiv des Auswärtigen Amts, various sub-volumes. Vandenhoeck und Ruprecht, Göttingen 1990 ff.
Hitler. Reden, Schriften, Anordnungen. Februar 1925 bis Januar 1933, various sub-volumes. Saur, Munich 1995 ff.,.
with Johannes Hürter and Ulrike Jureit: Verbrechen der Wehrmacht. Bilanz einer Debatte. Beck, Munich 2005, 2nd edition 2014,.
Von Feldherren und Gefreiten. Zur biographischen Dimension des Zweiten Weltkriegs. Oldenbourg, Munich 2008,.
with Johannes Hürter, Peter Lieb and Dieter Pohl: Der deutsche Krieg im Osten 1941–1944. Facetten einer Grenzüberschreitung. Oldenbourg, Munich 2009,.
with Thomas Vordermayer, Othmar Plöckinger and Roman Töppel: Hitler, Mein Kampf. Eine kritische Edition. 2 vols., with the assistance of Pascal Trees, Angelika Reizle and Martina Seewald-Mooser. Commissioned by the Institute of Contemporary History Munich – Berlin, 8th, reviewed edition, Institute of Contemporary History, Berlin 2018,.