The line (Frederik den Syvendes Sydslesvigske Jernbane) opened in 1854 and was one of the first Danish railways.
The Flensburg-Husum-Tönninger Railway Company (Danish: Flensborg-Husum-Tønning jernbaneselskab, German: Flensburg-Husum-Tönninger Eisenbahngesellschaft, FHTE) was owned by the British entrepreneur, Sir Samuel Morton Peto and built its trunk line during the reign of Frederick VII of Denmark from 1852 to 1854.
A major reason for the creation of a rail link between the Baltic port of Flensburg and the North Sea ports of Husum and especially Tönning on the Eider estuary was the export of live cattle to England.
At the same time, an important branch line was opened from Oster-Ohrstedt via Klosterkrug (now a station in the city of Schleswig) to Rendsburg, connecting to the Neumünster–Rendsburg line—opened on 18 September 1845 by the Rendsburg-Neumünster Railway Company (Rendsburg-Neumünsterschen Eisenbahn-Gesellschaft, RNE)—which in turn connected with the Hamburg-Altona–Kiel line.
On 29 December 1866, a section between Eggebek and Oster-Ohrstedt was abandoned and replaced by a more direct connection to Jübek on the new north-south line opened between Klosterkrug and Eggebek, where it connected with the line to Flensburg.