Anton Dietrich was born in 1783 in Mitterburg (Istria). He was a student of law and philosophy when several volunteer units were raised to fight against Napoleon. Such units were recruited all over Europe and in Austria these volunteer units were styled as the Landwehr. Anton Dietrich entered the 4th Adelsberger-Istrianer-Landwehr Bataillion on November the 1st 1808 as an Hauptmann. The battalion was formed in Loitsch in March 1808 consisting of six Füsilier and one Jäger companies and was initially commanded by Hauptmann Anton Segher von Wierenhaus. This battalion which was taken over by the state authorities on the 10th of April 1809 saw action under command of the IX Corps at the blockade of Pamanuova. Following the peace treaty Hauptmann Dietrich decided to stay in the army and was transferred to infantry regiment No 16 on the 1st of December. With this regiment he took part in the campaigns of the following years before he was transferred as a Major to infantry regiment No 15 on August 26th 1828. Soon after this transfer he was appointed as an instructor at the Military Academy at Wiener Neustadt. During the following 17 years he gave lessons in tactics and strategy and received his promotions to Oberstleutnant on the 15th of September 1837 and to Oberst on the15th of September 1837. On the 19th of September 1845 Anton Dietrich assumed command over the brigade at Belovár with a simultaneous promotion to Generalmajor.
During the rebellion of 1848 his brigade was attached to the corps of Feldzeugmeister Laval Graf Nugent. In January 1849 Generalmajor Dietrich captured Kaposvár. In May 1849, meanwhile promoted to Feldmarschall-Leutnant on the 9th of April, he took over command of a division in the Southern Army. He distinguished himself as a divisional commander during the battles of Neusatz, Becse and Heyes. For his excellent performance during the war of 1848/49 he was honored with the award of the commander's cross of the Order of Leopold, the Military Merit Cross which he was allowed to wear with war decoration when it was introduced in 1860 and the grand cross of the Russian Order of Saint Anna. On the 24th of September 1849 he assumed command of the division at Karlstadt shortly followed by the appointment as commander of the fortress at Ofen on the 16th of October 1849. As a commander of the Order of Leopold he requested a tax free ennobling, which was granted on the 16th of July 1851with the title of Freiherr. During the following decade Anton Freiherr von Dietrich performed excellent service in the prestigious post of a fortress-commander at Ofen and was honored by the city authorities with the title of honorary citizen. On the 30th of January 1858 he was retired with the further honour of the award of the title Geheimer Rat and the honorary promotion to Feldzeugmeister (mit Titel und Charakter). Feldzeugmeister Anton Freiherr von Dietrich remained at Ofen were he died on the 19th of May 1870 at the advanced age of 87.