 Haupt returned to the railroad business in 1847, accepting a position as construction engineer on the Pennsylvania Railroad, and then becoming its general superintendent from 1849 to 1851.Haupt and Thomson designed the Horseshoe Curve (now a National Historic Landmark) which enabled the Pennsylvania Railroad to cross the Allegheny Mountains and reach Pittsburgh, Pennsylvania.From 1851 until 1853, Haupt was the chief engineer of the Southern Railroad of Mississippi, then became the Pennsylvania Railroad's chief engineer until 1856; in the latter position he completed the Mountain Division with the Allegheny Tunnel, opening the line through to Pittsburgh.