During the 1806 War of the Fourth Coalition against Napoleon, Engelhardt was commander of the Livonia Zemstvo police guarding the border with East Prussia. During the 1812 campaign, Engelhardt led a force of volunteers and participated in the defense of Riga against the French under Marshal Macdonald; in recognition of his service, he was awarded the Order of St. Anne, second degree with diamonds.