In his twenties he fought the French invasion of Russia, seeing action at Smolensk on 12 June 1812, Borodino on August 26, Tarutino on October 6 and Maloyaroslavets on October 12. For his actions at Maloyaroslavets he was awarded the Order of Saint Vladimir 4th class, with swords and bow and finally, from 3 to 10 November, at Krasnoi. For his bravery, he was promoted to second lieutenant on 4 December 1812. As the Russians advanced into Germany, he fought at Lutzen on April 20, 1813, on 16 August near Dresden, on 17 and 18 August at Kulm (for which he received the Kulm Cross) and then 4 and 6 October near Leipzig. Whilst in the reserves in 1814, he also fought at Brienne, Arcis-sur-Aube, Fère-Champenoise, at a skirmish near Paris on March 18 and finally in the capture of Paris on 19 March. Grand Duke Konstantin Pavlovich appointed him to his personal staff and Dannenberg also received promotions to lieutenant and captain along with the Order of St Anne 2nd class. On 1 August 1814 he was transferred to the General Staff of the Guards. He was then promoted to colonel (1818) and Major-General (1827) with the appointment of Quartermaster-General Chief of Staff to the Tsarevich.