During the Middle Ages the town and castle were an alod of the Luchen family. On the 28th of October, 1287 Rapoto Luchen announced that he had entered an agreement with Archbishop Rudolph of Salzburg to hand over the alod, become the archbishop's ministerialis and thereafter run the lands as a fief of the Prince-Archbishops of Salzburg.
On 28 September 1322 the decisive Battle of Mühldorf was fought here between Bavaria and Salzburg. Before the battle the Prince-Archbishop of Salzburg knighted several of the burghers of the town.
During World War II, it was the site of several Allied air raids designed to target the rail links into Munich and disrupt the transportation of materials from the "Innwerk" industrial park in Toging am Inn. Around 44 U.S. Air personnel are thought to have perished during the return flight following one of these raids. Civilian casualties are believed to be much higher due to many aircraft crews being unable to identify their primary objectives.