Relatively late for a German state, Bavaria decided in around 1851 to complete its major rail links by building an east–west rail link between the German states and Italy via the Brenner railway and via Salzburg to Vienna and the Semmering railway.
Treaties agreed with the Kingdom of Württemberg and with the Austrian Empire on 25 April 1850 and ratified in 1851.
The route included, the existing line between Augsburg and Munich, completed by the former private Munich-Augsburg Railway Company in 1840.
The line began at the Württemberg and Bavaria border in the middle of the newly built bridge over the Danube between Ulm and Neu-Ulm, and ran for about 85 km to Augsburg.
From 1871, this section of the line lost its long-distance services after the opening of the shorter route via Grafing.