In 1811 he was chosen to inspect and report on the fortifications of Gdańsk. Thereafter he became one of the ordnance officers attached to the emperor, whom he followed closely through the Russian campaign of 1812; he was one of the first to enter the Kremlin and discovered there a quantity of gunpowder which might have been used for the destruction of Napoleon. For his services in this campaign he received the title of baron, and became first ordnance officer. In the campaign of 1813 in Saxony he again showed courage and prowess, especially at Leipzig and Hanau; but it was in the first battle of 1814, near to Brienne, that he rendered the most signal service by killing the leader of a small band of Cossacks who were riding furiously towards Napoleon's tent.