Auerbach was part of the Duchy of Bavaria until 1779, when it passed to Austria with the rest of the Innviertel as a result of the Treaty of Teschen, that ended the War of the Bavarian Succession. During the Napoleonic Wars, it became Bavarian again until 1814, when it rejoined Upper Austria.