Pfeil was born in Rammelburg. From 1801 onward, he trained and worked as a forester at several sites in the Harz region, Neuchâtel and Silesia. As a soldier in the Napoleonic Wars he fought at the Battles of Großbeeren and Wartenburg. From 1816 he was employed as a forester in the service of Heinrich Karl Erdmann, prince of Carolath-Beuthen. In 1821 he was awarded an honorary doctorate at the University of Berlin, and despite lacking a university education, was named a professor of forest science. In 1830 when the department of forestry was relocated to Eberswalde, he was named its director, a position he maintained up until his retirement in 1859.